summaryrefslogtreecommitdiff
path: root/tests/auto/quick/qquickpixmapcache
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/qquickpixmapcache
parent0959281be22c2d3317f010ac117010fdf990df7a (diff)
downloadqtdeclarative-e6846850a51cbe2a8cc8b9398430d1dd4f6ac7b3.tar.gz
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/qquickpixmapcache')
-rw-r--r--tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp b/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp
index 584cb78d3d..627ff19fb8 100644
--- a/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp
+++ b/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp
@@ -161,10 +161,10 @@ void tst_qquickpixmapcache::single()
if (incache) {
QCOMPARE(pixmap.error(), expectedError);
if (exists) {
- QVERIFY(pixmap.status() == QQuickPixmap::Ready);
+ QCOMPARE(pixmap.status(), QQuickPixmap::Ready);
QVERIFY(pixmap.width() > 0);
} else {
- QVERIFY(pixmap.status() == QQuickPixmap::Error);
+ QCOMPARE(pixmap.status(), QQuickPixmap::Error);
QVERIFY(pixmap.width() <= 0);
}
} else {
@@ -176,10 +176,10 @@ void tst_qquickpixmapcache::single()
QVERIFY(!QTestEventLoop::instance().timeout());
QVERIFY(getter.gotslot);
if (exists) {
- QVERIFY(pixmap.status() == QQuickPixmap::Ready);
+ QCOMPARE(pixmap.status(), QQuickPixmap::Ready);
QVERIFY(pixmap.width() > 0);
} else {
- QVERIFY(pixmap.status() == QQuickPixmap::Error);
+ QCOMPARE(pixmap.status(), QQuickPixmap::Error);
QVERIFY(pixmap.width() <= 0);
}
QCOMPARE(pixmap.error(), expectedError);
@@ -309,7 +309,7 @@ void tst_qquickpixmapcache::massive()
QVERIFY(p2.isReady());
QVERIFY(p2.image().size() == QSize(10000, 1000));
- QVERIFY(p2.image().cacheKey() == cachekey);
+ QCOMPARE(p2.image().cacheKey(), cachekey);
}
// Confirm that massive images are removed from the cache when