d81b065bb3
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>
144 lines
6.2 KiB
Plaintext
144 lines
6.2 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="xfailAndContinue">
|
|
<Message type="qdebug" file="" line="0">
|
|
<Description><![CDATA[begin]]></Description>
|
|
</Message>
|
|
<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="78">
|
|
<Description><![CDATA[This should xfail]]></Description>
|
|
</Incident>
|
|
<Message type="qdebug" file="" line="0">
|
|
<Description><![CDATA[after]]></Description>
|
|
</Message>
|
|
<Incident type="pass" file="" line="0" />
|
|
</TestFunction>
|
|
<TestFunction name="xfailAndAbort">
|
|
<Message type="qdebug" file="" line="0">
|
|
<Description><![CDATA[begin]]></Description>
|
|
</Message>
|
|
<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="86">
|
|
<Description><![CDATA[This should xfail]]></Description>
|
|
</Incident>
|
|
<Incident type="pass" file="" line="0" />
|
|
</TestFunction>
|
|
<TestFunction name="xfailTwice">
|
|
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="96">
|
|
<Description><![CDATA[Already expecting a fail]]></Description>
|
|
</Incident>
|
|
</TestFunction>
|
|
<TestFunction name="xfailWithQString">
|
|
<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="105">
|
|
<Description><![CDATA[A string]]></Description>
|
|
</Incident>
|
|
<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="110">
|
|
<Description><![CDATA[Bug 5 (The message)]]></Description>
|
|
</Incident>
|
|
<Incident type="pass" file="" line="0" />
|
|
</TestFunction>
|
|
<TestFunction name="xfailDataDrivenWithQVerify">
|
|
<Incident type="pass" file="" line="0">
|
|
<DataTag><![CDATA[Pass 1]]></DataTag>
|
|
</Incident>
|
|
<Incident type="pass" file="" line="0">
|
|
<DataTag><![CDATA[Pass 2]]></DataTag>
|
|
</Incident>
|
|
<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="139">
|
|
<DataTag><![CDATA[Abort]]></DataTag>
|
|
<Description><![CDATA[This test should xfail]]></Description>
|
|
</Incident>
|
|
<Incident type="pass" file="" line="0">
|
|
<DataTag><![CDATA[Abort]]></DataTag>
|
|
</Incident>
|
|
<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="139">
|
|
<DataTag><![CDATA[Continue]]></DataTag>
|
|
<Description><![CDATA[This test should xfail]]></Description>
|
|
</Incident>
|
|
<Incident type="pass" file="" line="0">
|
|
<DataTag><![CDATA[Continue]]></DataTag>
|
|
</Incident>
|
|
</TestFunction>
|
|
<TestFunction name="xfailDataDrivenWithQCompare">
|
|
<Incident type="pass" file="" line="0">
|
|
<DataTag><![CDATA[Pass 1]]></DataTag>
|
|
</Incident>
|
|
<Incident type="pass" file="" line="0">
|
|
<DataTag><![CDATA[Pass 2]]></DataTag>
|
|
</Incident>
|
|
<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="173">
|
|
<DataTag><![CDATA[Abort]]></DataTag>
|
|
<Description><![CDATA[This test should xfail]]></Description>
|
|
</Incident>
|
|
<Incident type="pass" file="" line="0">
|
|
<DataTag><![CDATA[Abort]]></DataTag>
|
|
</Incident>
|
|
<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="173">
|
|
<DataTag><![CDATA[Continue]]></DataTag>
|
|
<Description><![CDATA[This test should xfail]]></Description>
|
|
</Incident>
|
|
<Incident type="pass" file="" line="0">
|
|
<DataTag><![CDATA[Continue]]></DataTag>
|
|
</Incident>
|
|
</TestFunction>
|
|
<TestFunction name="xfailOnWrongRow">
|
|
<Incident type="pass" file="" line="0">
|
|
<DataTag><![CDATA[right row]]></DataTag>
|
|
</Incident>
|
|
</TestFunction>
|
|
<TestFunction name="xfailOnAnyRow">
|
|
<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="208">
|
|
<DataTag><![CDATA[first row]]></DataTag>
|
|
<Description><![CDATA[This test should xfail]]></Description>
|
|
</Incident>
|
|
<Incident type="pass" file="" line="0">
|
|
<DataTag><![CDATA[first row]]></DataTag>
|
|
</Incident>
|
|
<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="208">
|
|
<DataTag><![CDATA[second row]]></DataTag>
|
|
<Description><![CDATA[This test should xfail]]></Description>
|
|
</Incident>
|
|
<Incident type="pass" file="" line="0">
|
|
<DataTag><![CDATA[second row]]></DataTag>
|
|
</Incident>
|
|
</TestFunction>
|
|
<TestFunction name="xfailWithoutVerify">
|
|
<Incident type="fail" file="" line="0">
|
|
<DataTag><![CDATA[first row]]></DataTag>
|
|
<Description><![CDATA[QEXPECT_FAIL was called without any subsequent verification statements]]></Description>
|
|
</Incident>
|
|
<Incident type="fail" file="" line="0">
|
|
<DataTag><![CDATA[second row]]></DataTag>
|
|
<Description><![CDATA[QEXPECT_FAIL was called without any subsequent verification statements]]></Description>
|
|
</Incident>
|
|
</TestFunction>
|
|
<TestFunction name="xpass">
|
|
<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="228">
|
|
<Description><![CDATA['true' returned TRUE unexpectedly. ()]]></Description>
|
|
</Incident>
|
|
</TestFunction>
|
|
<TestFunction name="xpassDataDrivenWithQVerify">
|
|
<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="250">
|
|
<DataTag><![CDATA[XPass]]></DataTag>
|
|
<Description><![CDATA['true' returned TRUE unexpectedly. ()]]></Description>
|
|
</Incident>
|
|
<Incident type="pass" file="" line="0">
|
|
<DataTag><![CDATA[Pass]]></DataTag>
|
|
</Incident>
|
|
</TestFunction>
|
|
<TestFunction name="xpassDataDrivenWithQCompare">
|
|
<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="271">
|
|
<DataTag><![CDATA[XPass]]></DataTag>
|
|
<Description><![CDATA[QCOMPARE(1, 1) returned TRUE unexpectedly.]]></Description>
|
|
</Incident>
|
|
<Incident type="pass" file="" line="0">
|
|
<DataTag><![CDATA[Pass]]></DataTag>
|
|
</Incident>
|
|
</TestFunction>
|
|
<TestFunction name="cleanupTestCase">
|
|
<Incident type="pass" file="" line="0" />
|
|
</TestFunction>
|