summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/expected_cmptest.lightxml
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2012-02-02 17:08:44 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-13 01:46:09 +0100
commit9b2971cbb4ebf102198c2320a575e2fd718c182e (patch)
tree05e227d3607eda50b7e39255407c157f68b83e6f /tests/auto/testlib/selftests/expected_cmptest.lightxml
parenta6d3983ef6b7affef1d2aa48ed8bf8000a6e4267 (diff)
testlib: Count passes, fails and skips consistently.
For data-driven tests, testlib previously counted one fail or skip for each data row that failed or skipped, while it counted only one pass for a test function where all rows passed and counted no passes for a test function where some rows passed and some rows failed. A similar problem also existed for benchmark tests, which could run multiple iterations of the same test, with each fail and skip being counted but only a single pass being counted for the entire series of iterations. This commit makes testlib count one pass, fail or skip for each data row. Test functions that are not data-driven count one result for the test function, as before. Benchmark tests count one pass, fail or skip per iteration. A side-effect of this change is that the test output in plain text, xml and light xml formats now shows a result for every data row and benchmark iteration executed, allowing post-processors to correctly calculate the total number of tests executed. Previously, individual rows were not shown in the test output if they passed, making such calculations impossible. The only change to the xunitxml output format is to correct a bug where no test result was recorded for a test function if the last data row was skipped and all other rows passed -- in which case the overall result should be a pass. Note that there is also a pre-existing bug in the xunit logger, where no result is reported if all rows are skipped; that bug is unaffected by this commit. Task-number: QTBUG-21848 Task-number: QTBUG-22124 Change-Id: I7e17177e10d6e89e55b9684c159bd506f21d002b Reviewed-by: Ed Baak <ed.baak@nokia.com>
Diffstat (limited to 'tests/auto/testlib/selftests/expected_cmptest.lightxml')
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.lightxml57
1 files changed, 39 insertions, 18 deletions
diff --git a/tests/auto/testlib/selftests/expected_cmptest.lightxml b/tests/auto/testlib/selftests/expected_cmptest.lightxml
index 17f3e6ec3a..d1cccd4bd2 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.lightxml
+++ b/tests/auto/testlib/selftests/expected_cmptest.lightxml
@@ -12,25 +12,28 @@
<Incident type="pass" file="" line="0" />
</TestFunction>
<TestFunction name="compare_tostring">
-<Incident type="fail" file="tst_cmptest.cpp" line="214">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214">
<DataTag><![CDATA[int, string]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual): QVariant(int,123)
Expected (expected): QVariant(QString,hi)]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="214">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[both invalid]]></DataTag>
+</Incident>
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214">
<DataTag><![CDATA[null hash, invalid]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual): QVariant(QVariantHash)
Expected (expected): QVariant()]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="214">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214">
<DataTag><![CDATA[string, null user type]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual): QVariant(QString,A simple string)
Expected (expected): QVariant(PhonyClass)]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="214">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214">
<DataTag><![CDATA[both non-null user type]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual): QVariant(PhonyClass,<value not representable as string>)
@@ -38,31 +41,37 @@
</Incident>
</TestFunction>
<TestFunction name="compareQStringLists">
-<Incident type="fail" file="tst_cmptest.cpp" line="308">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[empty lists]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[equal lists]]></DataTag>
+</Incident>
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308">
<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="tst_cmptest.cpp" line="308">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308">
<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="tst_cmptest.cpp" line="308">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308">
<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="tst_cmptest.cpp" line="308">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308">
<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="tst_cmptest.cpp" line="308">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308">
<DataTag><![CDATA[short list first]]></DataTag>
<Description><![CDATA[Compared QStringLists have different sizes.
Actual (opA) size : '1'
@@ -70,55 +79,67 @@
</Incident>
</TestFunction>
<TestFunction name="compareQPixmaps">
-<Incident type="fail" file="tst_cmptest.cpp" line="333">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[both null]]></DataTag>
+</Incident>
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333">
<DataTag><![CDATA[one null]]></DataTag>
<Description><![CDATA[Compared QPixmaps differ.
Actual (opA).isNull() : 1
Expected (opB).isNull(): 0]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="333">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333">
<DataTag><![CDATA[other null]]></DataTag>
<Description><![CDATA[Compared QPixmaps differ.
Actual (opA).isNull() : 0
Expected (opB).isNull(): 1]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="333">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[equal]]></DataTag>
+</Incident>
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333">
<DataTag><![CDATA[different size]]></DataTag>
<Description><![CDATA[Compared QPixmaps differ in size.
Actual (opA) : 11x20
Expected (opB): 20x20]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="333">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333">
<DataTag><![CDATA[different pixels]]></DataTag>
<Description><![CDATA[Compared values are not the same]]></Description>
</Incident>
</TestFunction>
<TestFunction name="compareQImages">
-<Incident type="fail" file="tst_cmptest.cpp" line="360">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[both null]]></DataTag>
+</Incident>
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360">
<DataTag><![CDATA[one null]]></DataTag>
<Description><![CDATA[Compared QImages differ.
Actual (opA).isNull() : 1
Expected (opB).isNull(): 0]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="360">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360">
<DataTag><![CDATA[other null]]></DataTag>
<Description><![CDATA[Compared QImages differ.
Actual (opA).isNull() : 0
Expected (opB).isNull(): 1]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="360">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[equal]]></DataTag>
+</Incident>
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360">
<DataTag><![CDATA[different size]]></DataTag>
<Description><![CDATA[Compared QImages differ in size.
Actual (opA) : 11x20
Expected (opB): 20x20]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="360">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360">
<DataTag><![CDATA[different format]]></DataTag>
<Description><![CDATA[Compared QImages differ in format.
Actual (opA) : 6
Expected (opB): 3]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="360">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360">
<DataTag><![CDATA[different pixels]]></DataTag>
<Description><![CDATA[Compared values are not the same]]></Description>
</Incident>