aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-24 15:27:58 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-29 09:44:39 +0000
commit0ea3c24cfe7d1057964fe864924a7ee083764084 (patch)
tree681b7df0a201641203c936e748afd7d6a7ec39b5 /tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp
parentbb87365ffabcba3a70dd49a4c3232a12b5b224a3 (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/qqmlconnections/tst_qqmlconnections.cpp')
-rw-r--r--tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp b/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp
index c7781c2e9d..e529c74acc 100644
--- a/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp
+++ b/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp
@@ -72,7 +72,7 @@ void tst_qqmlconnections::defaultValues()
QQmlConnections *item = qobject_cast<QQmlConnections*>(c.create());
QVERIFY(item != 0);
- QVERIFY(item->target() == 0);
+ QVERIFY(!item->target());
delete item;
}
@@ -86,7 +86,7 @@ void tst_qqmlconnections::properties()
QVERIFY(item != 0);
QVERIFY(item != 0);
- QVERIFY(item->target() == item);
+ QCOMPARE(item->target(), item);
delete item;
}
@@ -146,7 +146,7 @@ void tst_qqmlconnections::targetChanged()
QQuickItem *item2 = item->findChild<QQuickItem*>("item2");
QVERIFY(item2);
- QVERIFY(connections->target() == item2);
+ QCOMPARE(connections->target(), item2);
// If we don't crash then we're OK
@@ -213,7 +213,7 @@ void tst_qqmlconnections::errors()
QQmlComponent c(&engine, url);
QVERIFY(c.isError());
QList<QQmlError> errors = c.errors();
- QVERIFY(errors.count() == 1);
+ QCOMPARE(errors.count(), 1);
QCOMPARE(errors.at(0).description(), error);
}