Make selftest for QEXPECT_FAIL more robust.
Make the test fail if calling QEXPECT_FAIL with the mode set to Abort does not cause the current test function to abort. Previously, such an error would not cause the selftest to fail and someone would have to see the warning message in the test output to know that there is a problem. Change-Id: I2bd58fafe6b51ea0ab86fde7c5afb781e4534ee4 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
parent
a59bc6a6e4
commit
29d8d8faec
@ -70,7 +70,9 @@ void tst_ExpectFail::expectAndAbort() const
|
||||
qDebug("begin");
|
||||
QEXPECT_FAIL("", "This should xfail", Abort);
|
||||
QVERIFY(false);
|
||||
qDebug("this should not be reached");
|
||||
|
||||
// If we get here the test did not correctly abort on the previous QVERIFY.
|
||||
QVERIFY2(false, "This should not be reached");
|
||||
}
|
||||
|
||||
void tst_ExpectFail::xfailWithQString() const
|
||||
|
Loading…
Reference in New Issue
Block a user