diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-09-08 18:42:25 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-10-05 15:15:36 +0000 |
commit | 08e083e682d92290e36e4fb09abaf0318575dd41 (patch) | |
tree | 015d723565961179f8dad65b97ae3919d0158b17 /tests/auto/opengl | |
parent | 7bbb9a8ce81653b1665c9c942cc707ce98f611c5 (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/opengl')
-rw-r--r-- | tests/auto/opengl/qgl/tst_qgl.cpp | 2 | ||||
-rw-r--r-- | tests/auto/opengl/qglthreads/tst_qglthreads.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp index f110b9cb0d..46e2345c6a 100644 --- a/tests/auto/opengl/qgl/tst_qgl.cpp +++ b/tests/auto/opengl/qgl/tst_qgl.cpp @@ -2142,7 +2142,7 @@ void tst_QGL::textureCleanup() QGLWidget w; w.resize(200,200); w.show(); - QTest::qWaitForWindowExposed(&w); + QVERIFY(QTest::qWaitForWindowExposed(&w)); w.makeCurrent(); // Test pixmaps which have been loaded via QPixmapCache are removed from the texture cache diff --git a/tests/auto/opengl/qglthreads/tst_qglthreads.cpp b/tests/auto/opengl/qglthreads/tst_qglthreads.cpp index ce895f734a..1a7ccba9be 100644 --- a/tests/auto/opengl/qglthreads/tst_qglthreads.cpp +++ b/tests/auto/opengl/qglthreads/tst_qglthreads.cpp @@ -523,7 +523,7 @@ public: GLWidgetWrapper() { widget.resize(150, 150); widget.show(); - QTest::qWaitForWindowExposed(&widget); + QVERIFY(QTest::qWaitForWindowExposed(&widget)); widget.doneCurrent(); } QPaintDevice *realPaintDevice() { return &widget; } |