aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickrepeater
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-24 15:32:22 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-27 18:45:21 +0000
commite6846850a51cbe2a8cc8b9398430d1dd4f6ac7b3 (patch)
treeee08e04b3f0eca16f7f12f2c2392eee9dbae41d8 /tests/auto/quick/qquickrepeater
parent0959281be22c2d3317f010ac117010fdf990df7a (diff)
tests/quick: 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: Ib9f4c2486af23c47990be4b9e004b965de226dcc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/auto/quick/qquickrepeater')
-rw-r--r--tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp b/tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp
index ab03bbcdce..a34001b23a 100644
--- a/tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp
+++ b/tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp
@@ -447,16 +447,16 @@ void tst_QQuickRepeater::itemModel()
QVERIFY(!testObject->error());
QCOMPARE(container->childItems().count(), 4);
- QVERIFY(qobject_cast<QObject*>(container->childItems().at(0))->objectName() == "item1");
- QVERIFY(qobject_cast<QObject*>(container->childItems().at(1))->objectName() == "item2");
- QVERIFY(qobject_cast<QObject*>(container->childItems().at(2))->objectName() == "item3");
- QVERIFY(container->childItems().at(3) == repeater);
+ QCOMPARE(qobject_cast<QObject*>(container->childItems().at(0))->objectName(), QLatin1String("item1"));
+ QCOMPARE(qobject_cast<QObject*>(container->childItems().at(1))->objectName(), QLatin1String("item2"));
+ QCOMPARE(qobject_cast<QObject*>(container->childItems().at(2))->objectName(), QLatin1String("item3"));
+ QCOMPARE(container->childItems().at(3), repeater);
QMetaObject::invokeMethod(window->rootObject(), "switchModel");
QCOMPARE(container->childItems().count(), 3);
- QVERIFY(qobject_cast<QObject*>(container->childItems().at(0))->objectName() == "item4");
- QVERIFY(qobject_cast<QObject*>(container->childItems().at(1))->objectName() == "item5");
- QVERIFY(container->childItems().at(2) == repeater);
+ QCOMPARE(qobject_cast<QObject*>(container->childItems().at(0))->objectName(), QLatin1String("item4"));
+ QCOMPARE(qobject_cast<QObject*>(container->childItems().at(1))->objectName(), QLatin1String("item5"));
+ QCOMPARE(container->childItems().at(2), repeater);
testObject->setUseModel(false);
QCOMPARE(container->childItems().count(), 1);
@@ -812,8 +812,8 @@ void tst_QQuickRepeater::invalidContextCrash()
repeater->setParent(root.data());
QCOMPARE(root->children().count(), 2);
- QVERIFY(root->children().at(0) == model);
- QVERIFY(root->children().at(1) == repeater);
+ QCOMPARE(root->children().at(0), model);
+ QCOMPARE(root->children().at(1), repeater);
// Delete the root object, which will invalidate/delete the QML context
// and then delete the child QObjects, which may try to access the context.