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/gui/kernel/qguiapplication/tst_qguiapplication.cpp | |
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/gui/kernel/qguiapplication/tst_qguiapplication.cpp')
-rw-r--r-- | tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp index a935258fb8..6ba488aaa7 100644 --- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp +++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp @@ -227,7 +227,7 @@ void tst_QGuiApplication::focusObject() QOpenGLContext context; context.create(); context.makeCurrent(&window1); - QTest::qWaitForWindowExposed(&window1); // Buffer swap only succeeds with exposed window + QVERIFY(QTest::qWaitForWindowExposed(&window1)); // Buffer swap only succeeds with exposed window context.swapBuffers(&window1); #endif @@ -392,7 +392,7 @@ void tst_QGuiApplication::changeFocusWindow() QOpenGLContext context; context.create(); context.makeCurrent(&window1); - QTest::qWaitForWindowExposed(&window1); // Buffer swap only succeeds with exposed window + QVERIFY(QTest::qWaitForWindowExposed(&window1)); // Buffer swap only succeeds with exposed window context.swapBuffers(&window1); #endif FocusChangeWindow window2; @@ -406,7 +406,7 @@ void tst_QGuiApplication::changeFocusWindow() #if defined(Q_OS_QNX) // We either need to create a eglSurface or a create a backing store // and then post the window in order for screen to show the window context.makeCurrent(&window2); - QTest::qWaitForWindowExposed(&window2); // Buffer swap only succeeds with exposed window + QVERIFY(QTest::qWaitForWindowExposed(&window2)); // Buffer swap only succeeds with exposed window context.swapBuffers(&window2); #endif QVERIFY(QTest::qWaitForWindowExposed(&window1)); |