Use QVERIFY2 to output verbose failure messages.

Change-Id: I2ce96d9d9f582e99c1d9f6dd6e6e80ce42d6e61d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
Jason McDonald 2011-12-29 13:34:25 +10:00 committed by Qt by Nokia
parent fb83806138
commit d8f1749a74

View File

@ -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");
}
}