qt5base-lts/tests/auto/testlib/selftests/expected_expectfail.txt
Jason McDonald d81b065bb3 testlib: Improve verbose and XPASS output
Previously, verbose (-v2) and XPASS test output showed all QCOMPAREs as
"COMPARE()", making it impossible to see what was compared and difficult
to match the output to the source of a test containing many calls to
QCOMPARE.

This commit changes testlib's internal compare_helper API so that string
representations of the compared expressions are always passed to
QTestResult::compare() when available, and can thus be shown in the
verbose and XPASS output.  The XPASS output has also been changed to
state explicitly that the comparison succeeded unexpectedly, bringing it
in line with the XPASS output resulting from a call to QVERIFY.

This commit also changes all calls to compare_helper() to call the
eight-argument version of the function, which simplifies much of the
calling code.  The now obsolete four-argument version of
compare_helper() has been changed to output a warning that it is
obsolete.  It will be removed once other modules have had some time to
catch up.

The improved XPASS and verbose output is demonstrated by the expectfail
and verbose2 selftests.

Change-Id: I8baa46d5dd30e6c43b26f366c34dc5b64aab5f7c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-08 05:31:40 +01:00

56 lines
4.0 KiB
Plaintext

********* Start testing of tst_ExpectFail *********
Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@
PASS : tst_ExpectFail::initTestCase()
QDEBUG : tst_ExpectFail::xfailAndContinue() begin
XFAIL : tst_ExpectFail::xfailAndContinue() This should xfail
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(78)]
QDEBUG : tst_ExpectFail::xfailAndContinue() after
PASS : tst_ExpectFail::xfailAndContinue()
QDEBUG : tst_ExpectFail::xfailAndAbort() begin
XFAIL : tst_ExpectFail::xfailAndAbort() This should xfail
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(86)]
PASS : tst_ExpectFail::xfailAndAbort()
FAIL! : tst_ExpectFail::xfailTwice() Already expecting a fail
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(96)]
XFAIL : tst_ExpectFail::xfailWithQString() A string
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(105)]
XFAIL : tst_ExpectFail::xfailWithQString() Bug 5 (The message)
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(110)]
PASS : tst_ExpectFail::xfailWithQString()
PASS : tst_ExpectFail::xfailDataDrivenWithQVerify(Pass 1)
PASS : tst_ExpectFail::xfailDataDrivenWithQVerify(Pass 2)
XFAIL : tst_ExpectFail::xfailDataDrivenWithQVerify(Abort) This test should xfail
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(139)]
PASS : tst_ExpectFail::xfailDataDrivenWithQVerify(Abort)
XFAIL : tst_ExpectFail::xfailDataDrivenWithQVerify(Continue) This test should xfail
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(139)]
PASS : tst_ExpectFail::xfailDataDrivenWithQVerify(Continue)
PASS : tst_ExpectFail::xfailDataDrivenWithQCompare(Pass 1)
PASS : tst_ExpectFail::xfailDataDrivenWithQCompare(Pass 2)
XFAIL : tst_ExpectFail::xfailDataDrivenWithQCompare(Abort) This test should xfail
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(173)]
PASS : tst_ExpectFail::xfailDataDrivenWithQCompare(Abort)
XFAIL : tst_ExpectFail::xfailDataDrivenWithQCompare(Continue) This test should xfail
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(173)]
PASS : tst_ExpectFail::xfailDataDrivenWithQCompare(Continue)
PASS : tst_ExpectFail::xfailOnWrongRow(right row)
XFAIL : tst_ExpectFail::xfailOnAnyRow(first row) This test should xfail
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(208)]
PASS : tst_ExpectFail::xfailOnAnyRow(first row)
XFAIL : tst_ExpectFail::xfailOnAnyRow(second row) This test should xfail
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(208)]
PASS : tst_ExpectFail::xfailOnAnyRow(second row)
FAIL! : tst_ExpectFail::xfailWithoutVerify(first row) QEXPECT_FAIL was called without any subsequent verification statements
FAIL! : tst_ExpectFail::xfailWithoutVerify(second row) QEXPECT_FAIL was called without any subsequent verification statements
XPASS : tst_ExpectFail::xpass() 'true' returned TRUE unexpectedly. ()
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(228)]
XPASS : tst_ExpectFail::xpassDataDrivenWithQVerify(XPass) 'true' returned TRUE unexpectedly. ()
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(250)]
PASS : tst_ExpectFail::xpassDataDrivenWithQVerify(Pass)
XPASS : tst_ExpectFail::xpassDataDrivenWithQCompare(XPass) QCOMPARE(1, 1) returned TRUE unexpectedly.
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(271)]
PASS : tst_ExpectFail::xpassDataDrivenWithQCompare(Pass)
PASS : tst_ExpectFail::cleanupTestCase()
Totals: 18 passed, 6 failed, 0 skipped
********* Finished testing of tst_ExpectFail *********