Give names to data rows in cmptest selftest.

Change-Id: Ia362f0651c8d32602fa13d6639fb8386fe8d9e0b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
Jason McDonald 2011-12-13 18:02:46 +10:00 committed by Qt by Nokia
parent 9bc546e492
commit 4a233f9a90
5 changed files with 25 additions and 15 deletions

View File

@ -142,7 +142,7 @@ void tst_Cmptest::compareQStringLists_data()
opA.append(QLatin1String("string3"));
opB.append(QLatin1String("DIFFERS"));
QTest::newRow("") << opA << opB;
QTest::newRow("last item different") << opA << opB;
}
{
@ -157,7 +157,7 @@ void tst_Cmptest::compareQStringLists_data()
opB.append(QLatin1String("DIFFERS"));
opB.append(QLatin1String("string4"));
QTest::newRow("") << opA << opB;
QTest::newRow("second-last item different") << opA << opB;
}
{
@ -168,7 +168,7 @@ void tst_Cmptest::compareQStringLists_data()
QStringList opB;
opB.append(QLatin1String("string1"));
QTest::newRow("") << opA << opB;
QTest::newRow("prefix") << opA << opB;
}
{
@ -189,9 +189,9 @@ void tst_Cmptest::compareQStringLists_data()
QStringList opB;
opB.append(QLatin1String("viewDocumentSource"));
QTest::newRow("") << opA << opB;
QTest::newRow("short list second") << opA << opB;
QTest::newRow("") << opB << opA;
QTest::newRow("short list first") << opB << opA;
}
}

View File

@ -39,26 +39,31 @@
</TestFunction>
<TestFunction name="compareQStringLists">
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="203">
<DataTag><![CDATA[last item different]]></DataTag>
<Description><![CDATA[Compared QStringLists differ at index 2.
Actual (opA) : 'string3'
Expected (opB) : 'DIFFERS']]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="203">
<DataTag><![CDATA[second-last item different]]></DataTag>
<Description><![CDATA[Compared QStringLists differ at index 2.
Actual (opA) : 'string3'
Expected (opB) : 'DIFFERS']]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="203">
<DataTag><![CDATA[prefix]]></DataTag>
<Description><![CDATA[Compared QStringLists have different sizes.
Actual (opA) size : '2'
Expected (opB) size: '1']]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="203">
<DataTag><![CDATA[short list second]]></DataTag>
<Description><![CDATA[Compared QStringLists have different sizes.
Actual (opA) size : '12'
Expected (opB) size: '1']]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="203">
<DataTag><![CDATA[short list first]]></DataTag>
<Description><![CDATA[Compared QStringLists have different sizes.
Actual (opA) size : '1'
Expected (opB) size: '12']]></Description>

View File

@ -19,23 +19,23 @@ FAIL! : tst_Cmptest::compare_tostring(both non-null user type) Compared values
Actual (actual): QVariant(PhonyClass,<value not representable as string>)
Expected (expected): QVariant(PhonyClass,<value not representable as string>)
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(122)]
FAIL! : tst_Cmptest::compareQStringLists() Compared QStringLists differ at index 2.
FAIL! : tst_Cmptest::compareQStringLists(last item different) Compared QStringLists differ at index 2.
Actual (opA) : 'string3'
Expected (opB) : 'DIFFERS'
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/alive/tst_alive.cpp(68)]
FAIL! : tst_Cmptest::compareQStringLists() Compared QStringLists differ at index 2.
FAIL! : tst_Cmptest::compareQStringLists(second-last item different) Compared QStringLists differ at index 2.
Actual (opA) : 'string3'
Expected (opB) : 'DIFFERS'
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/alive/tst_alive.cpp(68)]
FAIL! : tst_Cmptest::compareQStringLists() Compared QStringLists have different sizes.
FAIL! : tst_Cmptest::compareQStringLists(prefix) Compared QStringLists have different sizes.
Actual (opA) size : '2'
Expected (opB) size: '1'
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/alive/tst_alive.cpp(68)]
FAIL! : tst_Cmptest::compareQStringLists() Compared QStringLists have different sizes.
FAIL! : tst_Cmptest::compareQStringLists(short list second) Compared QStringLists have different sizes.
Actual (opA) size : '12'
Expected (opB) size: '1'
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/alive/tst_alive.cpp(68)]
FAIL! : tst_Cmptest::compareQStringLists() Compared QStringLists have different sizes.
FAIL! : tst_Cmptest::compareQStringLists(short list first) Compared QStringLists have different sizes.
Actual (opA) size : '1'
Expected (opB) size: '12'
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/alive/tst_alive.cpp(68)]

View File

@ -41,26 +41,31 @@
</TestFunction>
<TestFunction name="compareQStringLists">
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="203">
<DataTag><![CDATA[last item different]]></DataTag>
<Description><![CDATA[Compared QStringLists differ at index 2.
Actual (opA) : 'string3'
Expected (opB) : 'DIFFERS']]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="203">
<DataTag><![CDATA[second-last item different]]></DataTag>
<Description><![CDATA[Compared QStringLists differ at index 2.
Actual (opA) : 'string3'
Expected (opB) : 'DIFFERS']]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="203">
<DataTag><![CDATA[prefix]]></DataTag>
<Description><![CDATA[Compared QStringLists have different sizes.
Actual (opA) size : '2'
Expected (opB) size: '1']]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="203">
<DataTag><![CDATA[short list second]]></DataTag>
<Description><![CDATA[Compared QStringLists have different sizes.
Actual (opA) size : '12'
Expected (opB) size: '1']]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="203">
<DataTag><![CDATA[short list first]]></DataTag>
<Description><![CDATA[Compared QStringLists have different sizes.
Actual (opA) size : '1'
Expected (opB) size: '12']]></Description>

View File

@ -22,19 +22,19 @@
Expected (expected): QVariant(PhonyClass,&lt;value not representable as string&gt;)" result="fail"/>
</testcase>
<testcase result="fail" name="compareQStringLists">
<failure message="Compared QStringLists differ at index 2.
<failure tag="last item different" message="Compared QStringLists differ at index 2.
Actual (opA) : &apos;string3&apos;
Expected (opB) : &apos;DIFFERS&apos;" result="fail"/>
<failure message="Compared QStringLists differ at index 2.
<failure tag="second&#x002D;last item different" message="Compared QStringLists differ at index 2.
Actual (opA) : &apos;string3&apos;
Expected (opB) : &apos;DIFFERS&apos;" result="fail"/>
<failure message="Compared QStringLists have different sizes.
<failure tag="prefix" message="Compared QStringLists have different sizes.
Actual (opA) size : &apos;2&apos;
Expected (opB) size: &apos;1&apos;" result="fail"/>
<failure message="Compared QStringLists have different sizes.
<failure tag="short list second" message="Compared QStringLists have different sizes.
Actual (opA) size : &apos;12&apos;
Expected (opB) size: &apos;1&apos;" result="fail"/>
<failure message="Compared QStringLists have different sizes.
<failure tag="short list first" message="Compared QStringLists have different sizes.
Actual (opA) size : &apos;1&apos;
Expected (opB) size: &apos;12&apos;" result="fail"/>
</testcase>