diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-24 15:27:58 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-29 09:44:39 +0000 |
commit | 0ea3c24cfe7d1057964fe864924a7ee083764084 (patch) | |
tree | 681b7df0a201641203c936e748afd7d6a7ec39b5 /tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp | |
parent | bb87365ffabcba3a70dd49a4c3232a12b5b224a3 (diff) |
tests/qml: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0) by
Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and
add casts where necessary. The values will then be logged
should a test fail.
Change-Id: I8cc97fd9b48fc789a849e9527c292c4e05accd97
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp')
-rw-r--r-- | tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp index dddd9a7dc8..85579a6019 100644 --- a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp +++ b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp @@ -251,7 +251,7 @@ void tst_qqmlcomponent::qmlCreateObjectWithProperties() QObject *testObject1 = object->property("declarativerectangle").value<QObject*>(); QVERIFY(testObject1); - QVERIFY(testObject1->parent() == object); + QCOMPARE(testObject1->parent(), object); QCOMPARE(testObject1->property("x").value<int>(), 17); QCOMPARE(testObject1->property("y").value<int>(), 17); QCOMPARE(testObject1->property("color").value<QColor>(), QColor(255,255,255)); @@ -261,7 +261,7 @@ void tst_qqmlcomponent::qmlCreateObjectWithProperties() QObject *testObject2 = object->property("declarativeitem").value<QObject*>(); QVERIFY(testObject2); - QVERIFY(testObject2->parent() == object); + QCOMPARE(testObject2->parent(), object); //QCOMPARE(testObject2->metaObject()->className(), "QDeclarativeItem_QML_2"); QCOMPARE(testObject2->property("x").value<int>(), 17); QCOMPARE(testObject2->property("y").value<int>(), 17); @@ -448,7 +448,7 @@ void tst_qqmlcomponent::componentUrlCanonicalization() QQmlComponent component(&engine, testFileUrl("componentUrlCanonicalization.5.qml")); QTest::ignoreMessage(QtWarningMsg, QLatin1String("QQmlComponent: Component is not ready").data()); QScopedPointer<QObject> object(component.create()); - QVERIFY(object == 0); + QVERIFY(object.isNull()); } } |