summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-12-15 13:18:39 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2021-01-13 16:15:06 +0100
commitb88f692d7dde8b15b75a5194c3b2d97bd947787b (patch)
treef42098a85156a92f58e3476b5e047a5a6932ff1a /tests
parent29b2387587fe2ed2a73bdcbfa928acb755537284 (diff)
QTestLib: Show the values of unregistered enums
... on a failed QCOMPARE. Change-Id: I653894927e49fad92c21409d03ed70880ca510f6 Reviewed-by: Jason McDonald <macadder1@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.junitxml4
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.lightxml4
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.tap7
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.teamcity2
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xml4
6 files changed, 18 insertions, 5 deletions
diff --git a/tests/auto/testlib/selftests/expected_cmptest.junitxml b/tests/auto/testlib/selftests/expected_cmptest.junitxml
index 667cfaad44..b5d2721b7a 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.junitxml
+++ b/tests/auto/testlib/selftests/expected_cmptest.junitxml
@@ -7,7 +7,9 @@
</properties>
<testcase name="initTestCase" result="pass" time="@TEST_DURATION@"/>
<testcase name="compare_unregistered_enums" result="fail" time="@TEST_DURATION@">
- <failure result="fail" message="Compared values are not the same"/>
+ <failure result="fail" message="Compared values are not the same
+ Actual (MyUnregisteredEnumValue1): 0
+ Expected (MyUnregisteredEnumValue2): 1"/>
</testcase>
<testcase name="compare_registered_enums" result="fail" time="@TEST_DURATION@">
<failure result="fail" message="Compared values are not the same
diff --git a/tests/auto/testlib/selftests/expected_cmptest.lightxml b/tests/auto/testlib/selftests/expected_cmptest.lightxml
index ee2ca716a3..f87a3b3d9a 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.lightxml
+++ b/tests/auto/testlib/selftests/expected_cmptest.lightxml
@@ -9,7 +9,9 @@
</TestFunction>
<TestFunction name="compare_unregistered_enums">
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0">
- <Description><![CDATA[Compared values are not the same]]></Description>
+ <Description><![CDATA[Compared values are not the same
+ Actual (MyUnregisteredEnumValue1): 0
+ Expected (MyUnregisteredEnumValue2): 1]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
diff --git a/tests/auto/testlib/selftests/expected_cmptest.tap b/tests/auto/testlib/selftests/expected_cmptest.tap
index 52911f227c..b2856bc50c 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.tap
+++ b/tests/auto/testlib/selftests/expected_cmptest.tap
@@ -3,7 +3,12 @@ TAP version 13
ok 1 - initTestCase()
not ok 2 - compare_unregistered_enums()
---
- # Compared values are not the same
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: 1 (MyUnregisteredEnumValue2)
+ found: 0 (MyUnregisteredEnumValue1)
+ expected: 1 (MyUnregisteredEnumValue2)
+ actual: 0 (MyUnregisteredEnumValue1)
at: tst_Cmptest::compare_unregistered_enums() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:0)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
diff --git a/tests/auto/testlib/selftests/expected_cmptest.teamcity b/tests/auto/testlib/selftests/expected_cmptest.teamcity
index e971f2fd4b..59817b2006 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.teamcity
+++ b/tests/auto/testlib/selftests/expected_cmptest.teamcity
@@ -2,7 +2,7 @@
##teamcity[testStarted name='initTestCase()' flowId='tst_Cmptest']
##teamcity[testFinished name='initTestCase()' flowId='tst_Cmptest']
##teamcity[testStarted name='compare_unregistered_enums()' flowId='tst_Cmptest']
-##teamcity[testFailed name='compare_unregistered_enums()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same' flowId='tst_Cmptest']
+##teamcity[testFailed name='compare_unregistered_enums()' message='Failure! |[Loc: _FILE_(_LINE_)|]' details='Compared values are not the same|n Actual (MyUnregisteredEnumValue1): 0|n Expected (MyUnregisteredEnumValue2): 1' flowId='tst_Cmptest']
##teamcity[testFinished name='compare_unregistered_enums()' flowId='tst_Cmptest']
##teamcity[testStarted name='compare_registered_enums()' flowId='tst_Cmptest']
##teamcity[testFailed name='compare_registered_enums()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual (Qt::Monday): Monday|n Expected (Qt::Sunday): Sunday' flowId='tst_Cmptest']
diff --git a/tests/auto/testlib/selftests/expected_cmptest.txt b/tests/auto/testlib/selftests/expected_cmptest.txt
index 527ec991bb..525094d813 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.txt
+++ b/tests/auto/testlib/selftests/expected_cmptest.txt
@@ -2,6 +2,8 @@
Config: Using QtTest library
PASS : tst_Cmptest::initTestCase()
FAIL! : tst_Cmptest::compare_unregistered_enums() Compared values are not the same
+ Actual (MyUnregisteredEnumValue1): 0
+ Expected (MyUnregisteredEnumValue2): 1
Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)]
FAIL! : tst_Cmptest::compare_registered_enums() Compared values are not the same
Actual (Qt::Monday): Monday
diff --git a/tests/auto/testlib/selftests/expected_cmptest.xml b/tests/auto/testlib/selftests/expected_cmptest.xml
index c89f177a13..678a751669 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.xml
+++ b/tests/auto/testlib/selftests/expected_cmptest.xml
@@ -11,7 +11,9 @@
</TestFunction>
<TestFunction name="compare_unregistered_enums">
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0">
- <Description><![CDATA[Compared values are not the same]]></Description>
+ <Description><![CDATA[Compared values are not the same
+ Actual (MyUnregisteredEnumValue1): 0
+ Expected (MyUnregisteredEnumValue2): 1]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>