testlib: Add selftests for XPASS and XFAIL involving QCOMPARE.
Change-Id: I4f897b411aaa51ff453208eda50e12665489074b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
parent
f64f428b81
commit
88c903f6a3
@ -9,7 +9,7 @@
|
||||
<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="74">
|
||||
<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">
|
||||
@ -21,40 +21,62 @@
|
||||
<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="82">
|
||||
<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="92">
|
||||
<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="101">
|
||||
<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="106">
|
||||
<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="xfailDataDriven">
|
||||
<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="135">
|
||||
<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="135">
|
||||
<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>
|
||||
@ -68,14 +90,14 @@
|
||||
</Incident>
|
||||
</TestFunction>
|
||||
<TestFunction name="xfailOnAnyRow">
|
||||
<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="170">
|
||||
<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="170">
|
||||
<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>
|
||||
@ -94,12 +116,12 @@
|
||||
</Incident>
|
||||
</TestFunction>
|
||||
<TestFunction name="xpass">
|
||||
<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="190">
|
||||
<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="xpassDataDriven">
|
||||
<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="212">
|
||||
<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>
|
||||
@ -107,6 +129,15 @@
|
||||
<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[COMPARE()]]></Description>
|
||||
</Incident>
|
||||
<Incident type="pass" file="" line="0">
|
||||
<DataTag><![CDATA[Pass]]></DataTag>
|
||||
</Incident>
|
||||
</TestFunction>
|
||||
<TestFunction name="cleanupTestCase">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
</TestFunction>
|
||||
|
@ -3,42 +3,53 @@ 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(74)]
|
||||
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(82)]
|
||||
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(92)]
|
||||
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(101)]
|
||||
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(106)]
|
||||
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(110)]
|
||||
PASS : tst_ExpectFail::xfailWithQString()
|
||||
PASS : tst_ExpectFail::xfailDataDriven(Pass 1)
|
||||
PASS : tst_ExpectFail::xfailDataDriven(Pass 2)
|
||||
XFAIL : tst_ExpectFail::xfailDataDriven(Abort) This test should xfail
|
||||
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(135)]
|
||||
PASS : tst_ExpectFail::xfailDataDriven(Abort)
|
||||
XFAIL : tst_ExpectFail::xfailDataDriven(Continue) This test should xfail
|
||||
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(135)]
|
||||
PASS : tst_ExpectFail::xfailDataDriven(Continue)
|
||||
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(170)]
|
||||
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(170)]
|
||||
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(190)]
|
||||
XPASS : tst_ExpectFail::xpassDataDriven(XPass) 'true' returned TRUE unexpectedly. ()
|
||||
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(212)]
|
||||
PASS : tst_ExpectFail::xpassDataDriven(Pass)
|
||||
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) COMPARE()
|
||||
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: 13 passed, 5 failed, 0 skipped
|
||||
Totals: 18 passed, 6 failed, 0 skipped
|
||||
********* Finished testing of tst_ExpectFail *********
|
||||
|
@ -11,7 +11,7 @@
|
||||
<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="74">
|
||||
<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">
|
||||
@ -23,40 +23,62 @@
|
||||
<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="82">
|
||||
<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="92">
|
||||
<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="101">
|
||||
<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="106">
|
||||
<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="xfailDataDriven">
|
||||
<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="135">
|
||||
<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="135">
|
||||
<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>
|
||||
@ -70,14 +92,14 @@
|
||||
</Incident>
|
||||
</TestFunction>
|
||||
<TestFunction name="xfailOnAnyRow">
|
||||
<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="170">
|
||||
<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="170">
|
||||
<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>
|
||||
@ -96,12 +118,12 @@
|
||||
</Incident>
|
||||
</TestFunction>
|
||||
<TestFunction name="xpass">
|
||||
<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="190">
|
||||
<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="xpassDataDriven">
|
||||
<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="212">
|
||||
<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>
|
||||
@ -109,6 +131,15 @@
|
||||
<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[COMPARE()]]></Description>
|
||||
</Incident>
|
||||
<Incident type="pass" file="" line="0">
|
||||
<DataTag><![CDATA[Pass]]></DataTag>
|
||||
</Incident>
|
||||
</TestFunction>
|
||||
<TestFunction name="cleanupTestCase">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
</TestFunction>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<testsuite errors="11" failures="5" tests="12" name="tst_ExpectFail">
|
||||
<testsuite errors="13" failures="6" tests="14" name="tst_ExpectFail">
|
||||
<properties>
|
||||
<property value="5.0.0" name="QTestVersion"/>
|
||||
<property value="5.0.0" name="QtVersion"/>
|
||||
<property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
|
||||
<property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
|
||||
</properties>
|
||||
<testcase result="pass" name="initTestCase"/>
|
||||
<testcase result="xfail" name="xfailAndContinue">
|
||||
@ -21,7 +21,11 @@
|
||||
<!-- message="A string" type="info" -->
|
||||
<!-- message="Bug 5 (The message)" type="info" -->
|
||||
</testcase>
|
||||
<testcase result="xfail" name="xfailDataDriven">
|
||||
<testcase result="xfail" name="xfailDataDrivenWithQVerify">
|
||||
<!-- tag="Abort" message="This test should xfail" type="info" -->
|
||||
<!-- tag="Continue" message="This test should xfail" type="info" -->
|
||||
</testcase>
|
||||
<testcase result="xfail" name="xfailDataDrivenWithQCompare">
|
||||
<!-- tag="Abort" message="This test should xfail" type="info" -->
|
||||
<!-- tag="Continue" message="This test should xfail" type="info" -->
|
||||
</testcase>
|
||||
@ -37,9 +41,12 @@
|
||||
<testcase result="xpass" name="xpass">
|
||||
<failure message="'true' returned TRUE unexpectedly. ()" result="xpass"/>
|
||||
</testcase>
|
||||
<testcase result="xpass" name="xpassDataDriven">
|
||||
<testcase result="xpass" name="xpassDataDrivenWithQVerify">
|
||||
<failure tag="XPass" message="'true' returned TRUE unexpectedly. ()" result="xpass"/>
|
||||
</testcase>
|
||||
<testcase result="xpass" name="xpassDataDrivenWithQCompare">
|
||||
<failure tag="XPass" message="COMPARE()" result="xpass"/>
|
||||
</testcase>
|
||||
<testcase result="pass" name="cleanupTestCase"/>
|
||||
<system-err>
|
||||
<![CDATA[begin]]>
|
||||
@ -52,6 +59,8 @@
|
||||
<![CDATA[This test should xfail]]>
|
||||
<![CDATA[This test should xfail]]>
|
||||
<![CDATA[This test should xfail]]>
|
||||
<![CDATA[This test should xfail]]>
|
||||
<![CDATA[This test should xfail]]>
|
||||
<![CDATA[This test should xfail]]>
|
||||
</system-err>
|
||||
</testsuite>
|
||||
|
@ -54,8 +54,10 @@ private slots:
|
||||
void xfailAndAbort() const;
|
||||
void xfailTwice() const;
|
||||
void xfailWithQString() const;
|
||||
void xfailDataDriven_data() const;
|
||||
void xfailDataDriven() const;
|
||||
void xfailDataDrivenWithQVerify_data() const;
|
||||
void xfailDataDrivenWithQVerify() const;
|
||||
void xfailDataDrivenWithQCompare_data() const;
|
||||
void xfailDataDrivenWithQCompare() const;
|
||||
void xfailOnWrongRow_data() const;
|
||||
void xfailOnWrongRow() const;
|
||||
void xfailOnAnyRow_data() const;
|
||||
@ -63,8 +65,10 @@ private slots:
|
||||
void xfailWithoutVerify_data() const;
|
||||
void xfailWithoutVerify() const;
|
||||
void xpass() const;
|
||||
void xpassDataDriven_data() const;
|
||||
void xpassDataDriven() const;
|
||||
void xpassDataDrivenWithQVerify_data() const;
|
||||
void xpassDataDrivenWithQVerify() const;
|
||||
void xpassDataDrivenWithQCompare_data() const;
|
||||
void xpassDataDrivenWithQCompare() const;
|
||||
};
|
||||
|
||||
void tst_ExpectFail::xfailAndContinue() const
|
||||
@ -106,7 +110,7 @@ void tst_ExpectFail::xfailWithQString() const
|
||||
QVERIFY(false);
|
||||
}
|
||||
|
||||
void tst_ExpectFail::xfailDataDriven_data() const
|
||||
void tst_ExpectFail::xfailDataDrivenWithQVerify_data() const
|
||||
{
|
||||
QTest::addColumn<bool>("shouldPass");
|
||||
QTest::addColumn<QTest::TestFailMode>("failMode");
|
||||
@ -117,7 +121,7 @@ void tst_ExpectFail::xfailDataDriven_data() const
|
||||
QTest::newRow("Continue") << false << QTest::Continue;
|
||||
}
|
||||
|
||||
void tst_ExpectFail::xfailDataDriven() const
|
||||
void tst_ExpectFail::xfailDataDrivenWithQVerify() const
|
||||
{
|
||||
QFETCH(bool, shouldPass);
|
||||
QFETCH(QTest::TestFailMode, failMode);
|
||||
@ -140,6 +144,40 @@ void tst_ExpectFail::xfailDataDriven() const
|
||||
QCOMPARE(failMode, QTest::Continue);
|
||||
}
|
||||
|
||||
void tst_ExpectFail::xfailDataDrivenWithQCompare_data() const
|
||||
{
|
||||
QTest::addColumn<bool>("shouldPass");
|
||||
QTest::addColumn<QTest::TestFailMode>("failMode");
|
||||
|
||||
QTest::newRow("Pass 1") << true << QTest::Abort;
|
||||
QTest::newRow("Pass 2") << true << QTest::Continue;
|
||||
QTest::newRow("Abort") << false << QTest::Abort;
|
||||
QTest::newRow("Continue") << false << QTest::Continue;
|
||||
}
|
||||
|
||||
void tst_ExpectFail::xfailDataDrivenWithQCompare() const
|
||||
{
|
||||
QFETCH(bool, shouldPass);
|
||||
QFETCH(QTest::TestFailMode, failMode);
|
||||
|
||||
// You can't pass a variable as the last parameter of QEXPECT_FAIL,
|
||||
// because the macro adds "QTest::" in front of the last parameter.
|
||||
// That is why the following code appears to be a little strange.
|
||||
if (!shouldPass) {
|
||||
if (failMode == QTest::Abort)
|
||||
QEXPECT_FAIL(QTest::currentDataTag(), "This test should xfail", Abort);
|
||||
else
|
||||
QEXPECT_FAIL(QTest::currentDataTag(), "This test should xfail", Continue);
|
||||
}
|
||||
|
||||
QCOMPARE(1, shouldPass ? 1 : 2);
|
||||
|
||||
// If we get here, we either expected to pass or we expected to
|
||||
// fail and the failure mode was Continue.
|
||||
if (!shouldPass)
|
||||
QCOMPARE(failMode, QTest::Continue);
|
||||
}
|
||||
|
||||
void tst_ExpectFail::xfailOnWrongRow_data() const
|
||||
{
|
||||
QTest::addColumn<int>("dummy");
|
||||
@ -194,7 +232,7 @@ void tst_ExpectFail::xpass() const
|
||||
QVERIFY2(false, "This should not be reached");
|
||||
}
|
||||
|
||||
void tst_ExpectFail::xpassDataDriven_data() const
|
||||
void tst_ExpectFail::xpassDataDrivenWithQVerify_data() const
|
||||
{
|
||||
QTest::addColumn<bool>("shouldXPass");
|
||||
|
||||
@ -202,7 +240,7 @@ void tst_ExpectFail::xpassDataDriven_data() const
|
||||
QTest::newRow("Pass") << false;
|
||||
}
|
||||
|
||||
void tst_ExpectFail::xpassDataDriven() const
|
||||
void tst_ExpectFail::xpassDataDrivenWithQVerify() const
|
||||
{
|
||||
QFETCH(bool, shouldXPass);
|
||||
|
||||
@ -215,5 +253,26 @@ void tst_ExpectFail::xpassDataDriven() const
|
||||
QVERIFY2(!shouldXPass, "Test failed to terminate on XPASS");
|
||||
}
|
||||
|
||||
void tst_ExpectFail::xpassDataDrivenWithQCompare_data() const
|
||||
{
|
||||
QTest::addColumn<bool>("shouldXPass");
|
||||
|
||||
QTest::newRow("XPass") << true;
|
||||
QTest::newRow("Pass") << false;
|
||||
}
|
||||
|
||||
void tst_ExpectFail::xpassDataDrivenWithQCompare() const
|
||||
{
|
||||
QFETCH(bool, shouldXPass);
|
||||
|
||||
if (shouldXPass)
|
||||
QEXPECT_FAIL(QTest::currentDataTag(), "This test should xpass", Abort);
|
||||
|
||||
QCOMPARE(1, 1);
|
||||
|
||||
// We should only get here if the test wasn't supposed to xpass.
|
||||
QVERIFY2(!shouldXPass, "Test failed to terminate on XPASS");
|
||||
}
|
||||
|
||||
QTEST_MAIN(tst_ExpectFail)
|
||||
#include "tst_expectfail.moc"
|
||||
|
Loading…
Reference in New Issue
Block a user