summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-12-29 13:34:25 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-30 02:07:50 +0100
commitd8f1749a7472ce924304d45cdd94f8488b1e65fd (patch)
tree8415c73eae0ee53be42b09e308973a9b9d2d8690 /tests/auto
parentfb83806138ed8fc86aed4a0ad9747f8a47f10088 (diff)
Use QVERIFY2 to output verbose failure messages.
Change-Id: I2ce96d9d9f582e99c1d9f6dd6e6e80ce42d6e61d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp b/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
index d1350ba84a..d5b58c892d 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
+++ b/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
@@ -446,8 +446,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
} catch (const Exception &) {
caught = true;
}
- if (!caught)
- QFAIL("did not get exception");
+ QVERIFY2(caught, "did not get exception");
}
// Blocking mode:
@@ -460,9 +459,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
} catch (const Exception &) {
caught = true;
}
-
- if (!caught)
- QFAIL("did not get exception");
+ QVERIFY2(caught, "did not get exception");
}
// test throwing the exception from the main thread (different code path)
@@ -474,9 +471,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
} catch (const Exception &) {
caught = true;
}
-
- if (!caught)
- QFAIL("did not get exception");
+ QVERIFY2(caught, "did not get exception");
}
// Asynchronous mode:
@@ -489,8 +484,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
} catch (const QtConcurrent::UnhandledException &) {
caught = true;
}
- if (!caught)
- QFAIL("did not get exception");
+ QVERIFY2(caught, "did not get exception");
}
// Blocking mode:
@@ -503,9 +497,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
} catch (const QtConcurrent::UnhandledException &) {
caught = true;
}
-
- if (!caught)
- QFAIL("did not get exception");
+ QVERIFY2(caught, "did not get exception");
}
// test throwing the exception from the main thread (different code path)
@@ -517,9 +509,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
} catch (const QtConcurrent::UnhandledException &) {
caught = true;
}
-
- if (!caught)
- QFAIL("did not get exception");
+ QVERIFY2(caught, "did not get exception");
}
}