summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qboxlayout
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/kernel/qboxlayout
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/kernel/qboxlayout')
-rw-r--r--tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp b/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp
index 0b35db1b5f..bcdd103531 100644
--- a/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp
+++ b/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp
@@ -160,7 +160,7 @@ void tst_QBoxLayout::sizeHint()
lay1->addLayout(lay2);
window.setLayout(lay1);
window.show();
- QTest::qWaitForWindowExposed(&window);
+ QVERIFY(QTest::qWaitForWindowExposed(&window));
label->setText("foooooooo baaaaaaar");
QSize sh = lay1->sizeHint();
QApplication::processEvents();
@@ -181,7 +181,7 @@ void tst_QBoxLayout::sizeConstraints()
lay->setSizeConstraint(QLayout::SetFixedSize);
window.setLayout(lay);
window.show();
- QTest::qWaitForWindowExposed(&window);
+ QVERIFY(QTest::qWaitForWindowExposed(&window));
QSize sh = window.sizeHint();
delete lay->takeAt(1);
QVERIFY(sh.width() >= window.sizeHint().width() &&
@@ -228,7 +228,7 @@ void tst_QBoxLayout::setStyleShouldChangeSpacing()
style1->hspacing = 6;
window.setStyle(style1.data());
window.show();
- QTest::qWaitForWindowExposed(&window);
+ QVERIFY(QTest::qWaitForWindowExposed(&window));
int spacing = pb2->geometry().left() - pb1->geometry().right() - 1;
QCOMPARE(spacing, 6);