summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/gui/graphicsview
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/benchmarks/gui/graphicsview
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/benchmarks/gui/graphicsview')
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp
index 55f2fd0dcc..87ab80d74f 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp
@@ -326,7 +326,7 @@ void tst_GraphicsViewBenchmark::initTestCase()
currentListSize = -1;
currentListType = None;
- QTest::qWaitForWindowShown(mMainView);
+ QVERIFY(QTest::qWaitForWindowShown(mMainView));
}
void tst_GraphicsViewBenchmark::cleanupTestCase()
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp b/tests/benchmarks/gui/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
index b1a54a831d..1db130203a 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
@@ -110,7 +110,7 @@ void tst_QGraphicsLayout::invalidate()
view->show();
- QTest::qWaitForWindowShown(view);
+ QVERIFY(QTest::qWaitForWindowShown(view));
// ...then measure...
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index cdec833f4e..9bb5231528 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -160,7 +160,7 @@ void tst_QGraphicsView::initTestCase()
mView.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
mView.tryResize(100, 100);
mView.show();
- QTest::qWaitForWindowExposed(&mView);
+ QVERIFY(QTest::qWaitForWindowExposed(&mView));
QTest::qWait(300);
processEvents();
}
@@ -409,7 +409,7 @@ void tst_QGraphicsView::chipTester()
tester.setOpenGL(opengl);
tester.setOperation(ChipTester::Operation(operation));
tester.show();
- QTest::qWaitForWindowExposed(&tester);
+ QVERIFY(QTest::qWaitForWindowExposed(&tester));
QTest::qWait(250);
processEvents();