From: Jason McDonald Date: Thu, 29 Dec 2011 03:34:25 +0000 (+1000) Subject: Use QVERIFY2 to output verbose failure messages. X-Git-Tag: qt-v5.0.0-alpha1~2102 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d8f1749a7472ce924304d45cdd94f8488b1e65fd;p=profile%2Fivi%2Fqtbase.git Use QVERIFY2 to output verbose failure messages. Change-Id: I2ce96d9d9f582e99c1d9f6dd6e6e80ce42d6e61d Reviewed-by: Rohan McGovern --- diff --git a/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp b/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp index d1350ba..d5b58c8 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"); } }