From 08e083e682d92290e36e4fb09abaf0318575dd41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 8 Sep 2017 18:42:25 +0200 Subject: Ensure result of all QTest::qWaitFor are verified The qWaitFor functions themselves can not trigger a test failure, as that will not result in the test function exiting early, so every single call to qWaitFor needs to be wrapped in a QVERIFY. Change-Id: Id15a1549f31d06cdbf788e1d84ea431c28636ec8 Reviewed-by: Thiago Macieira --- tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp') diff --git a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp index 4441337f6e..6a16e48394 100644 --- a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp +++ b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp @@ -594,7 +594,7 @@ void tst_QMessageBox::detailsText() box.setDetailedText(text); QCOMPARE(box.detailedText(), text); box.show(); - QTest::qWaitForWindowExposed(&box); + QVERIFY(QTest::qWaitForWindowExposed(&box)); // QTBUG-39334, the box should now have the default "Ok" button as well as // the "Show Details.." button. QCOMPARE(box.findChildren().size(), 2); @@ -647,7 +647,7 @@ void tst_QMessageBox::expandDetails_QTBUG_32473() // that the window manager is also done manipulating the first QMessageBox. QWidget fleece; fleece.show(); - QTest::qWaitForWindowExposed(&fleece); + QVERIFY(QTest::qWaitForWindowExposed(&fleece)); if (geom.topLeft() == box.geometry().topLeft()) QTest::qWait(500); QCOMPARE(geom.topLeft(), box.geometry().topLeft()); -- cgit v1.2.3