qt5base-lts/tests/auto/testlib/selftests/expected_verbose2.lightxml
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

223 lines
10 KiB
Plaintext

<Environment>
<QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
<QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
</Environment>
<TestFunction name="initTestCase">
<Incident type="pass" file="" line="0" />
</TestFunction>
<TestFunction name="testPassPass">
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111">
<DataTag><![CDATA[row 1]]></DataTag>
<Description><![CDATA[QVERIFY(true)]]></Description>
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 1]]></DataTag>
<Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 1]]></DataTag>
</Incident>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111">
<DataTag><![CDATA[row 2]]></DataTag>
<Description><![CDATA[QVERIFY(true)]]></Description>
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 2]]></DataTag>
<Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 2]]></DataTag>
</Incident>
</TestFunction>
<TestFunction name="testPassSkip">
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111">
<DataTag><![CDATA[row 1]]></DataTag>
<Description><![CDATA[QVERIFY(true)]]></Description>
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 1]]></DataTag>
<Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 1]]></DataTag>
</Incident>
<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118">
<DataTag><![CDATA[row 2]]></DataTag>
<Description><![CDATA[Skipping]]></Description>
</Message>
</TestFunction>
<TestFunction name="testPassFail">
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111">
<DataTag><![CDATA[row 1]]></DataTag>
<Description><![CDATA[QVERIFY(true)]]></Description>
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 1]]></DataTag>
<Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 1]]></DataTag>
</Incident>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115">
<DataTag><![CDATA[row 2]]></DataTag>
<Description><![CDATA[QVERIFY(false)]]></Description>
</Message>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115">
<DataTag><![CDATA[row 2]]></DataTag>
<Description><![CDATA['false' returned FALSE. ()]]></Description>
</Incident>
</TestFunction>
<TestFunction name="testSkipPass">
<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118">
<DataTag><![CDATA[row 1]]></DataTag>
<Description><![CDATA[Skipping]]></Description>
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111">
<DataTag><![CDATA[row 2]]></DataTag>
<Description><![CDATA[QVERIFY(true)]]></Description>
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 2]]></DataTag>
<Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 2]]></DataTag>
</Incident>
</TestFunction>
<TestFunction name="testSkipSkip">
<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118">
<DataTag><![CDATA[row 1]]></DataTag>
<Description><![CDATA[Skipping]]></Description>
</Message>
<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118">
<DataTag><![CDATA[row 2]]></DataTag>
<Description><![CDATA[Skipping]]></Description>
</Message>
</TestFunction>
<TestFunction name="testSkipFail">
<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118">
<DataTag><![CDATA[row 1]]></DataTag>
<Description><![CDATA[Skipping]]></Description>
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115">
<DataTag><![CDATA[row 2]]></DataTag>
<Description><![CDATA[QVERIFY(false)]]></Description>
</Message>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115">
<DataTag><![CDATA[row 2]]></DataTag>
<Description><![CDATA['false' returned FALSE. ()]]></Description>
</Incident>
</TestFunction>
<TestFunction name="testFailPass">
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115">
<DataTag><![CDATA[row 1]]></DataTag>
<Description><![CDATA[QVERIFY(false)]]></Description>
</Message>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115">
<DataTag><![CDATA[row 1]]></DataTag>
<Description><![CDATA['false' returned FALSE. ()]]></Description>
</Incident>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111">
<DataTag><![CDATA[row 2]]></DataTag>
<Description><![CDATA[QVERIFY(true)]]></Description>
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 2]]></DataTag>
<Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 2]]></DataTag>
</Incident>
</TestFunction>
<TestFunction name="testFailSkip">
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115">
<DataTag><![CDATA[row 1]]></DataTag>
<Description><![CDATA[QVERIFY(false)]]></Description>
</Message>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115">
<DataTag><![CDATA[row 1]]></DataTag>
<Description><![CDATA['false' returned FALSE. ()]]></Description>
</Incident>
<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118">
<DataTag><![CDATA[row 2]]></DataTag>
<Description><![CDATA[Skipping]]></Description>
</Message>
</TestFunction>
<TestFunction name="testFailFail">
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115">
<DataTag><![CDATA[row 1]]></DataTag>
<Description><![CDATA[QVERIFY(false)]]></Description>
</Message>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115">
<DataTag><![CDATA[row 1]]></DataTag>
<Description><![CDATA['false' returned FALSE. ()]]></Description>
</Incident>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115">
<DataTag><![CDATA[row 2]]></DataTag>
<Description><![CDATA[QVERIFY(false)]]></Description>
</Message>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115">
<DataTag><![CDATA[row 2]]></DataTag>
<Description><![CDATA['false' returned FALSE. ()]]></Description>
</Incident>
</TestFunction>
<TestFunction name="testFailInInit">
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[before]]></DataTag>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="234">
<DataTag><![CDATA[fail]]></DataTag>
<Description><![CDATA[Fail in init()]]></Description>
</Incident>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[after]]></DataTag>
</Incident>
</TestFunction>
<TestFunction name="testFailInCleanup">
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[before]]></DataTag>
</Incident>
<Message type="qdebug" file="" line="0">
<DataTag><![CDATA[fail]]></DataTag>
<Description><![CDATA[This test function should execute and then QFAIL in cleanup() ]]></Description>
</Message>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="242">
<DataTag><![CDATA[fail]]></DataTag>
<Description><![CDATA[Fail in cleanup()]]></Description>
</Incident>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[after]]></DataTag>
</Incident>
</TestFunction>
<TestFunction name="testSkipInInit">
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[before]]></DataTag>
</Incident>
<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="236">
<DataTag><![CDATA[skip]]></DataTag>
<Description><![CDATA[Skip in init()]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[after]]></DataTag>
</Incident>
</TestFunction>
<TestFunction name="testSkipInCleanup">
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[before]]></DataTag>
</Incident>
<Message type="qdebug" file="" line="0">
<DataTag><![CDATA[skip]]></DataTag>
<Description><![CDATA[This test function should execute and then QSKIP in cleanup() ]]></Description>
</Message>
<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="244">
<DataTag><![CDATA[skip]]></DataTag>
<Description><![CDATA[Skip in cleanup()]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[after]]></DataTag>
</Incident>
</TestFunction>
<TestFunction name="cleanupTestCase">
<Incident type="pass" file="" line="0" />
</TestFunction>