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/qvulkan | |
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/qvulkan')
-rw-r--r-- | tests/auto/gui/qvulkan/tst_qvulkan.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/gui/qvulkan/tst_qvulkan.cpp b/tests/auto/gui/qvulkan/tst_qvulkan.cpp index 8027935003..cc4bc43f92 100644 --- a/tests/auto/gui/qvulkan/tst_qvulkan.cpp +++ b/tests/auto/gui/qvulkan/tst_qvulkan.cpp @@ -116,7 +116,7 @@ void tst_QVulkan::vulkanPlainWindow() w.setVulkanInstance(&inst); w.resize(1024, 768); w.show(); - QTest::qWaitForWindowExposed(&w); + QVERIFY(QTest::qWaitForWindowExposed(&w)); QCOMPARE(w.vulkanInstance(), &inst); @@ -182,7 +182,7 @@ void tst_QVulkan::vulkanWindow() QVERIFY(!w.isValid()); w.resize(1024, 768); w.show(); - QTest::qWaitForWindowExposed(&w); + QVERIFY(QTest::qWaitForWindowExposed(&w)); QVERIFY(!w.isValid()); // Now set it. A simple hide - show should be enough to correct, this, no @@ -194,7 +194,7 @@ void tst_QVulkan::vulkanWindow() if (pdevs.isEmpty()) QSKIP("No Vulkan physical devices; skip"); w.show(); - QTest::qWaitForWindowExposed(&w); + QVERIFY(QTest::qWaitForWindowExposed(&w)); QVERIFY(w.isValid()); QCOMPARE(w.vulkanInstance(), &inst); QVulkanInfoVector<QVulkanExtension> exts = w.supportedDeviceExtensions(); @@ -208,7 +208,7 @@ void tst_QVulkan::vulkanWindow() // supported lists can be queried before expose too QVERIFY(w.supportedDeviceExtensions() == exts); w.show(); - QTest::qWaitForWindowExposed(&w); + QVERIFY(QTest::qWaitForWindowExposed(&w)); QVERIFY(w.isValid()); QVERIFY(w.flags().testFlag(QVulkanWindow::PersistentResources)); @@ -355,7 +355,7 @@ void tst_QVulkan::vulkanWindowRenderer() w.setVulkanInstance(&inst); w.resize(1024, 768); w.show(); - QTest::qWaitForWindowExposed(&w); + QVERIFY(QTest::qWaitForWindowExposed(&w)); if (w.availablePhysicalDevices().isEmpty()) QSKIP("No Vulkan physical devices; skip"); @@ -389,7 +389,7 @@ void tst_QVulkan::vulkanWindowGrab() w.setVulkanInstance(&inst); w.resize(1024, 768); w.show(); - QTest::qWaitForWindowExposed(&w); + QVERIFY(QTest::qWaitForWindowExposed(&w)); if (w.availablePhysicalDevices().isEmpty()) QSKIP("No Vulkan physical devices; skip"); |