From 0959281be22c2d3317f010ac117010fdf990df7a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 24 Jul 2015 13:39:05 +0200 Subject: Tests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v). Preparing the replacement of Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) for non-boolean types. Change-Id: I8a4e44a2b4e20a9c8b811799e3932c8ce1a2cbbb Reviewed-by: Mitch Curtis --- .../qquickpositioners/tst_qquickpositioners.cpp | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp') diff --git a/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp b/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp index c68f58383b..474fdf9f8d 100644 --- a/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp +++ b/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp @@ -3919,9 +3919,9 @@ void tst_qquickpositioners::test_attachedproperties() int posIndex = greenRect->property("posIndex").toInt(); QVERIFY(posIndex == 0); bool isFirst = greenRect->property("isFirstItem").toBool(); - QVERIFY(isFirst == true); + QVERIFY(isFirst); bool isLast = greenRect->property("isLastItem").toBool(); - QVERIFY(isLast == false); + QVERIFY(!isLast); QQuickRectangle *yellowRect = window->rootObject()->findChild("yellowRect"); QVERIFY(yellowRect != 0); @@ -3929,18 +3929,18 @@ void tst_qquickpositioners::test_attachedproperties() posIndex = yellowRect->property("posIndex").toInt(); QVERIFY(posIndex == -1); isFirst = yellowRect->property("isFirstItem").toBool(); - QVERIFY(isFirst == false); + QVERIFY(!isFirst); isLast = yellowRect->property("isLastItem").toBool(); - QVERIFY(isLast == false); + QVERIFY(!isLast); yellowRect->metaObject()->invokeMethod(yellowRect, "onDemandPositioner"); posIndex = yellowRect->property("posIndex").toInt(); QVERIFY(posIndex == 1); isFirst = yellowRect->property("isFirstItem").toBool(); - QVERIFY(isFirst == false); + QVERIFY(!isFirst); isLast = yellowRect->property("isLastItem").toBool(); - QVERIFY(isLast == true); + QVERIFY(isLast); } @@ -3968,9 +3968,9 @@ void tst_qquickpositioners::test_attachedproperties_dynamic() int posIndex = rect0->property("index").toInt(); QVERIFY(posIndex == 0); bool isFirst = rect0->property("firstItem").toBool(); - QVERIFY(isFirst == true); + QVERIFY(isFirst); bool isLast = rect0->property("lastItem").toBool(); - QVERIFY(isLast == false); + QVERIFY(!isLast); QQuickRectangle *rect1 = window->rootObject()->findChild("rect1"); QVERIFY(rect1 != 0); @@ -3978,15 +3978,15 @@ void tst_qquickpositioners::test_attachedproperties_dynamic() posIndex = rect1->property("index").toInt(); QVERIFY(posIndex == 1); isFirst = rect1->property("firstItem").toBool(); - QVERIFY(isFirst == false); + QVERIFY(!isFirst); isLast = rect1->property("lastItem").toBool(); - QVERIFY(isLast == true); + QVERIFY(isLast); row->metaObject()->invokeMethod(row, "createSubRect"); QTRY_VERIFY(rect1->property("index").toInt() == 1); - QTRY_VERIFY(rect1->property("firstItem").toBool() == false); - QTRY_VERIFY(rect1->property("lastItem").toBool() == false); + QTRY_VERIFY(!rect1->property("firstItem").toBool()); + QTRY_VERIFY(!rect1->property("lastItem").toBool()); QQuickRectangle *rect2 = window->rootObject()->findChild("rect2"); QVERIFY(rect2 != 0); @@ -3994,9 +3994,9 @@ void tst_qquickpositioners::test_attachedproperties_dynamic() posIndex = rect2->property("index").toInt(); QVERIFY(posIndex == 2); isFirst = rect2->property("firstItem").toBool(); - QVERIFY(isFirst == false); + QVERIFY(!isFirst); isLast = rect2->property("lastItem").toBool(); - QVERIFY(isLast == true); + QVERIFY(isLast); row->metaObject()->invokeMethod(row, "destroySubRect"); @@ -4004,8 +4004,8 @@ void tst_qquickpositioners::test_attachedproperties_dynamic() QCoreApplication::processEvents(); QTRY_VERIFY(rect1->property("index").toInt() == 1); - QTRY_VERIFY(rect1->property("firstItem").toBool() == false); - QTRY_VERIFY(rect1->property("lastItem").toBool() == true); + QTRY_VERIFY(!rect1->property("firstItem").toBool()); + QTRY_VERIFY(rect1->property("lastItem").toBool()); } -- cgit v1.2.3