diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-24 15:32:22 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-27 18:45:21 +0000 |
commit | e6846850a51cbe2a8cc8b9398430d1dd4f6ac7b3 (patch) | |
tree | ee08e04b3f0eca16f7f12f2c2392eee9dbae41d8 /tests/auto/quick/qquickimageprovider | |
parent | 0959281be22c2d3317f010ac117010fdf990df7a (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/qquickimageprovider')
-rw-r--r-- | tests/auto/quick/qquickimageprovider/tst_qquickimageprovider.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/auto/quick/qquickimageprovider/tst_qquickimageprovider.cpp b/tests/auto/quick/qquickimageprovider/tst_qquickimageprovider.cpp index 80406be753..644f2be129 100644 --- a/tests/auto/quick/qquickimageprovider/tst_qquickimageprovider.cpp +++ b/tests/auto/quick/qquickimageprovider/tst_qquickimageprovider.cpp @@ -237,15 +237,15 @@ void tst_qquickimageprovider::runTest(bool async, QQuickImageProvider *provider) async |= (provider->flags() & QQuickImageProvider::ForceAsynchronousImageLoading) != 0; if (async) - QTRY_VERIFY(obj->status() == QQuickImage::Loading); + QTRY_COMPARE(obj->status(), QQuickImage::Loading); QCOMPARE(obj->source(), QUrl(source)); if (error.isEmpty()) { if (async) - QTRY_VERIFY(obj->status() == QQuickImage::Ready); + QTRY_COMPARE(obj->status(), QQuickImage::Ready); else - QVERIFY(obj->status() == QQuickImage::Ready); + QCOMPARE(obj->status(), QQuickImage::Ready); if (QByteArray(QTest::currentDataTag()).startsWith("qimage")) QCOMPARE(static_cast<TestQImageProvider*>(provider)->lastImageId, imageId); else @@ -257,9 +257,9 @@ void tst_qquickimageprovider::runTest(bool async, QQuickImageProvider *provider) QCOMPARE(obj->progress(), 1.0); } else { if (async) - QTRY_VERIFY(obj->status() == QQuickImage::Error); + QTRY_COMPARE(obj->status(), QQuickImage::Error); else - QVERIFY(obj->status() == QQuickImage::Error); + QCOMPARE(obj->status(), QQuickImage::Error); } delete obj; @@ -456,7 +456,7 @@ void tst_qquickimageprovider::threadTest() provider->cond.wakeAll(); QTest::qWait(250); foreach (QQuickImage *img, images) { - QTRY_VERIFY(img->status() == QQuickImage::Ready); + QTRY_COMPARE(img->status(), QQuickImage::Ready); } } @@ -544,14 +544,14 @@ void tst_qquickimageprovider::asyncTextureTest() QList<QQuickImage *> images = obj->findChildren<QQuickImage *>(); QCOMPARE(images.count(), 4); - QTRY_VERIFY(provider->pool.activeThreadCount() == 4); + QTRY_COMPARE(provider->pool.activeThreadCount(), 4); foreach (QQuickImage *img, images) { - QTRY_VERIFY(img->status() == QQuickImage::Loading); + QTRY_COMPARE(img->status(), QQuickImage::Loading); } provider->ok = true; provider->condition.wakeAll(); foreach (QQuickImage *img, images) { - QTRY_VERIFY(img->status() == QQuickImage::Ready); + QTRY_COMPARE(img->status(), QQuickImage::Ready); } } |