summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-03-22 01:31:56 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-03-22 01:31:56 (GMT)
commit0dcdb5cf31c99968b2e7e45ddc985997593a865c (patch)
tree4fb693e987956609d9d7fca57f1ee52c1f268ce7 /tests
parent6ed43975f6733265b8b91b00a9a212076d896ef9 (diff)
downloadQt-0dcdb5cf31c99968b2e7e45ddc985997593a865c.zip
Qt-0dcdb5cf31c99968b2e7e45ddc985997593a865c.tar.gz
Qt-0dcdb5cf31c99968b2e7e45ddc985997593a865c.tar.bz2
Fix qdeclarativeqt::createQmlObject autotest
The warning message expected in this test changed.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml4
-rw-r--r--tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp10
2 files changed, 8 insertions, 6 deletions
diff --git a/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml b/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml
index 9150782..54a3e7d 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml
@@ -7,7 +7,7 @@ Item {
property bool incorrectArgCount2: false
property bool emptyArg: false
property bool noParent: false
- property bool notReady: false
+ property bool notAvailable: false
property bool runtimeError: false
property bool errors: false
@@ -20,7 +20,7 @@ Item {
emptyArg = (createQmlObject("", root) == null);
errors = (createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13\nproperty int test: 13\n}", root, "main.qml") == null);
noParent = (createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13}", 0) == null);
- notReady = (createQmlObject("import Qt 4.6\nQtObject{\nBlah{}\n}", root, "http://www.example.com/main.qml") == null);
+ notAvailable = (createQmlObject("import Qt 4.6\nQtObject{Blah{}}", root) == null);
runtimeError = (createQmlObject("import Qt 4.6\nQtObject{property int test\nonTestChanged: QtObject{}\n}", root) == null);
var o = createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13\n}", root);
diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
index debec02..4987557 100644
--- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
+++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
@@ -301,15 +301,17 @@ void tst_qdeclarativeqt::createQmlObject()
QString warning1 = "QDeclarativeEngine::createQmlObject():";
QString warning2 = " " + TEST_FILE("main.qml").toString() + ":4:1: Duplicate property name";
- QString warning3 = "QDeclarativeEngine::createQmlObject(): Component is not ready";
- QString warning4 = "QDeclarativeEngine::createQmlObject():";
- QString warning5 = " " + TEST_FILE("inline").toString() + ":3: Cannot assign object type QObject with no default method";
+ QString warning3 = "QDeclarativeEngine::createQmlObject():";
+ QString warning4 = " " + TEST_FILE("inline").toString() + ":2:10: Blah is not a type";
+ QString warning5 = "QDeclarativeEngine::createQmlObject():";
+ QString warning6 = " " + TEST_FILE("inline").toString() + ":3: Cannot assign object type QObject with no default method";
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning3));
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning4));
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning5));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning6));
QObject *object = component.create();
QVERIFY(object != 0);
@@ -319,7 +321,7 @@ void tst_qdeclarativeqt::createQmlObject()
QCOMPARE(object->property("emptyArg").toBool(), true);
QCOMPARE(object->property("errors").toBool(), true);
QCOMPARE(object->property("noParent").toBool(), true);
- QCOMPARE(object->property("notReady").toBool(), true);
+ QCOMPARE(object->property("notAvailable").toBool(), true);
QCOMPARE(object->property("runtimeError").toBool(), true);
QCOMPARE(object->property("success").toBool(), true);