From e6846850a51cbe2a8cc8b9398430d1dd4f6ac7b3 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 24 Jul 2015 15:32:22 +0200 Subject: 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 --- .../quick/qquicksmoothedanimation/tst_qquicksmoothedanimation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/auto/quick/qquicksmoothedanimation/tst_qquicksmoothedanimation.cpp') diff --git a/tests/auto/quick/qquicksmoothedanimation/tst_qquicksmoothedanimation.cpp b/tests/auto/quick/qquicksmoothedanimation/tst_qquicksmoothedanimation.cpp index 04fdc4ecf7..10e91c455b 100644 --- a/tests/auto/quick/qquicksmoothedanimation/tst_qquicksmoothedanimation.cpp +++ b/tests/auto/quick/qquicksmoothedanimation/tst_qquicksmoothedanimation.cpp @@ -130,9 +130,9 @@ void tst_qquicksmoothedanimation::simpleAnimation() animation->setProperty("x"); animation->setTo(200); animation->setDuration(250); - QVERIFY(animation->target() == rect); - QVERIFY(animation->property() == "x"); - QVERIFY(animation->to() == 200); + QCOMPARE(animation->target(), rect); + QCOMPARE(animation->property(), QLatin1String("x")); + QCOMPARE(animation->to(), qreal(200)); animation->start(); QVERIFY(animation->isRunning()); QTest::qWait(animation->duration()); @@ -147,7 +147,7 @@ void tst_qquicksmoothedanimation::simpleAnimation() QVERIFY(animation->isRunning()); QVERIFY(animation->isPaused()); animation->setCurrentTime(125); - QVERIFY(animation->currentTime() == 125); + QCOMPARE(animation->currentTime(), 125); QCOMPARE(rect->x(), qreal(100)); } -- cgit v1.2.3