summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qscrollbar
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-09-08 18:42:25 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-10-05 15:15:36 +0000
commit08e083e682d92290e36e4fb09abaf0318575dd41 (patch)
tree015d723565961179f8dad65b97ae3919d0158b17 /tests/auto/widgets/widgets/qscrollbar
parent7bbb9a8ce81653b1665c9c942cc707ce98f611c5 (diff)
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 <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/widgets/widgets/qscrollbar')
-rw-r--r--tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
index 5238eea592..5ef2c7bc50 100644
--- a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
+++ b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
@@ -78,7 +78,7 @@ void tst_QScrollBar::scrollSingleStep()
testWidget.resize(100, testWidget.height());
centerOnScreen(&testWidget);
testWidget.show();
- QTest::qWaitForWindowExposed(&testWidget);
+ QVERIFY(QTest::qWaitForWindowExposed(&testWidget));
testWidget.setValue(testWidget.minimum());
QCOMPARE(testWidget.value(), testWidget.minimum());
@@ -117,7 +117,7 @@ void tst_QScrollBar::task_209492()
verticalScrollBar->setRange(0, 1000);
centerOnScreen(&scrollArea);
scrollArea.show();
- QTest::qWaitForWindowExposed(&scrollArea);
+ QVERIFY(QTest::qWaitForWindowExposed(&scrollArea));
QSignalSpy spy(verticalScrollBar, SIGNAL(actionTriggered(int)));
QCOMPARE(scrollArea.scrollCount, 0);
@@ -154,7 +154,7 @@ void tst_QScrollBar::QTBUG_27308()
testWidget.resize(100, testWidget.height());
centerOnScreen(&testWidget);
testWidget.show();
- QTest::qWaitForWindowExposed(&testWidget);
+ QVERIFY(QTest::qWaitForWindowExposed(&testWidget));
testWidget.setValue(testWidget.minimum());
testWidget.setEnabled(false);
@@ -183,7 +183,7 @@ void tst_QScrollBar::QTBUG_42871()
scrollBarWidget.resize(100, scrollBarWidget.height());
centerOnScreen(&scrollBarWidget);
scrollBarWidget.show();
- QTest::qWaitForWindowExposed(&scrollBarWidget);
+ QVERIFY(QTest::qWaitForWindowExposed(&scrollBarWidget));
QSignalSpy spy(&scrollBarWidget, SIGNAL(actionTriggered(int)));
QVERIFY(spy.isValid());
QCOMPARE(myHandler.updatesCount, 0);