summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-09 17:01:38 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-13 15:14:35 +0200
commit92e696b4bad52c40c6cdc1c5bf7c0c0ea8a2b283 (patch)
treedd87bef36f4b7a06d395237ee0a66b816d6598ca /tests/auto/testlib
parent3fee97c4ab0796fcafcdea692ff7c7e83005a2aa (diff)
Use debug stream in QTest::toString's default fallback if possible
For built-in types, this is a compile-time assert - we should not have any types in Qt for which we have neither debug streaming nor a QTest::toString specialization implemented. A build of most of Qt submodules passes with this change, after minor modifications to some tests. We cannot declare QSizeHint::Policy as a metatype after the QMetaType has already been instantiated for it, and the QDebug stream operator for QElaspedTimer needs to be correctly declared within the namespace. Add a self-test function for a custom type, and update reference files of the self-test. Task-number: QTBUG-104867 Pick-to: 6.4 Change-Id: I2936db5933f4589fce45f47cf2f3224ed614d8c9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/testlib')
-rw-r--r--tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp31
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.junitxml8
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.lightxml8
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.tap116
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.teamcity3
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.txt6
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xml8
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.junitxml2
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.lightxml2
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.tap4
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.teamcity2
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.xml2
13 files changed, 131 insertions, 63 deletions
diff --git a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
index 5842d7b3b1..94c04157f2 100644
--- a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+++ b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
@@ -115,6 +115,7 @@ private slots:
void compare_tostring();
void compare_tostring_data();
void compare_unknown();
+ void compare_textFromDebug();
void compareQObjects();
void compareQStringLists();
void compareQStringLists_data();
@@ -324,10 +325,36 @@ void tst_Cmptest::compare_tostring()
QCOMPARE(actual, expected);
}
+struct UnknownType
+{
+ int value;
+ bool operator==(const UnknownType &rhs) const { return value == rhs.value; }
+};
+
void tst_Cmptest::compare_unknown()
{
- std::string a("a");
- std::string b("b");
+ UnknownType a{1};
+ UnknownType b{2};
+
+ QCOMPARE(a, b);
+}
+
+struct CustomType
+{
+ int value;
+ bool operator==(const CustomType &rhs) const { return value == rhs.value; }
+};
+
+QDebug operator<<(QDebug dbg, const CustomType &val)
+{
+ dbg << "QDebug stream: " << val.value;
+ return dbg;
+}
+
+void tst_Cmptest::compare_textFromDebug()
+{
+ CustomType a{0};
+ CustomType b{1};
QCOMPARE(a, b);
}
diff --git a/tests/auto/testlib/selftests/expected_cmptest.junitxml b/tests/auto/testlib/selftests/expected_cmptest.junitxml
index 2c92cc66fd..f71b8f0a19 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.junitxml
+++ b/tests/auto/testlib/selftests/expected_cmptest.junitxml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<testsuite name="tst_Cmptest" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="68" failures="47" errors="0" skipped="0" time="@TEST_DURATION@">
+<testsuite name="tst_Cmptest" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="69" failures="48" errors="0" skipped="0" time="@TEST_DURATION@">
<properties>
<property name="QTestVersion" value="@INSERT_QT_VERSION_HERE@"/>
<property name="QtVersion" value="@INSERT_QT_VERSION_HERE@"/>
@@ -84,6 +84,12 @@
Expected : b]]>
</failure>
</testcase>
+ <testcase name="compare_textFromDebug" classname="tst_Cmptest" time="@TEST_DURATION@">
+ <failure type="fail" message="Compared values are not the same">
+ <![CDATA[ Actual (a): QDebug stream: 0
+ Expected (b): QDebug stream: 1]]>
+ </failure>
+ </testcase>
<testcase name="compareQObjects" classname="tst_Cmptest" time="@TEST_DURATION@">
<failure type="fail" message="Compared QObject pointers are not the same">
<![CDATA[ Actual (&object1): QObject/"object1"
diff --git a/tests/auto/testlib/selftests/expected_cmptest.lightxml b/tests/auto/testlib/selftests/expected_cmptest.lightxml
index 9082dd56d3..3cb492361b 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.lightxml
+++ b/tests/auto/testlib/selftests/expected_cmptest.lightxml
@@ -117,6 +117,14 @@
</Incident>
<Duration msecs="0"/>
</TestFunction>
+ <TestFunction name="compare_textFromDebug">
+ <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0">
+ <Description><![CDATA[Compared values are not the same
+ Actual (a): QDebug stream: 0
+ Expected (b): QDebug stream: 1]]></Description>
+ </Incident>
+ <Duration msecs="0"/>
+ </TestFunction>
<TestFunction name="compareQObjects">
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0">
<Description><![CDATA[Compared QObject pointers are not the same
diff --git a/tests/auto/testlib/selftests/expected_cmptest.tap b/tests/auto/testlib/selftests/expected_cmptest.tap
index 9a7f13fe7e..da7f21ab70 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.tap
+++ b/tests/auto/testlib/selftests/expected_cmptest.tap
@@ -148,7 +148,19 @@ not ok 19 - compare_unknown()
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 20 - compareQObjects()
+not ok 20 - compare_textFromDebug()
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: QDebug stream: 1 (b)
+ found: QDebug stream: 0 (a)
+ expected: QDebug stream: 1 (b)
+ actual: QDebug stream: 0 (a)
+ at: tst_Cmptest::compare_textFromDebug() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:0)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 0
+ ...
+not ok 21 - compareQObjects()
---
type: QCOMPARE
message: Compared QObject pointers are not the same
@@ -160,9 +172,9 @@ not ok 20 - compareQObjects()
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-ok 21 - compareQStringLists(empty lists)
-ok 22 - compareQStringLists(equal lists)
-not ok 23 - compareQStringLists(last item different)
+ok 22 - compareQStringLists(empty lists)
+ok 23 - compareQStringLists(equal lists)
+not ok 24 - compareQStringLists(last item different)
---
type: QCOMPARE
message: Compared lists differ at index 2.
@@ -174,7 +186,7 @@ not ok 23 - compareQStringLists(last item different)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 24 - compareQStringLists(second-last item different)
+not ok 25 - compareQStringLists(second-last item different)
---
type: QCOMPARE
message: Compared lists differ at index 2.
@@ -186,7 +198,7 @@ not ok 24 - compareQStringLists(second-last item different)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 25 - compareQStringLists(prefix)
+not ok 26 - compareQStringLists(prefix)
---
# Compared lists have different sizes.
Actual (opA) size: 2
@@ -195,7 +207,7 @@ not ok 25 - compareQStringLists(prefix)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 26 - compareQStringLists(short list second)
+not ok 27 - compareQStringLists(short list second)
---
# Compared lists have different sizes.
Actual (opA) size: 12
@@ -204,7 +216,7 @@ not ok 26 - compareQStringLists(short list second)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 27 - compareQStringLists(short list first)
+not ok 28 - compareQStringLists(short list first)
---
# Compared lists have different sizes.
Actual (opA) size: 1
@@ -213,8 +225,8 @@ not ok 27 - compareQStringLists(short list first)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-ok 28 - compareQListInt(match)
-not ok 29 - compareQListInt(size mismatch)
+ok 29 - compareQListInt(match)
+not ok 30 - compareQListInt(size mismatch)
---
# Compared lists have different sizes.
Actual (actual) size: 2
@@ -223,7 +235,7 @@ not ok 29 - compareQListInt(size mismatch)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 30 - compareQListInt(value mismatch)
+not ok 31 - compareQListInt(value mismatch)
---
type: QCOMPARE
message: Compared lists differ at index 2.
@@ -235,8 +247,8 @@ not ok 30 - compareQListInt(value mismatch)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-ok 31 - compareQListIntToArray(match)
-not ok 32 - compareQListIntToArray(size mismatch)
+ok 32 - compareQListIntToArray(match)
+not ok 33 - compareQListIntToArray(size mismatch)
---
# Compared lists have different sizes.
Actual (actual) size: 2
@@ -245,7 +257,7 @@ not ok 32 - compareQListIntToArray(size mismatch)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 33 - compareQListIntToArray(value mismatch)
+not ok 34 - compareQListIntToArray(value mismatch)
---
type: QCOMPARE
message: Compared lists differ at index 2.
@@ -257,8 +269,8 @@ not ok 33 - compareQListIntToArray(value mismatch)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-ok 34 - compareQListIntToInitializerList(match)
-not ok 35 - compareQListIntToInitializerList(size mismatch)
+ok 35 - compareQListIntToInitializerList(match)
+not ok 36 - compareQListIntToInitializerList(size mismatch)
---
# Compared lists have different sizes.
Actual (actual) size: 2
@@ -267,7 +279,7 @@ not ok 35 - compareQListIntToInitializerList(size mismatch)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 36 - compareQListIntToInitializerList(value mismatch)
+not ok 37 - compareQListIntToInitializerList(value mismatch)
---
type: QCOMPARE
message: Compared lists differ at index 2.
@@ -279,7 +291,7 @@ not ok 36 - compareQListIntToInitializerList(value mismatch)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 37 - compareQListDouble()
+not ok 38 - compareQListDouble()
---
type: QCOMPARE
message: Compared lists differ at index 0.
@@ -291,8 +303,8 @@ not ok 37 - compareQListDouble()
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-ok 38 - compareQColor(Qt::yellow vs "yellow")
-not ok 39 - compareQColor(Qt::yellow vs Qt::green)
+ok 39 - compareQColor(Qt::yellow vs "yellow")
+not ok 40 - compareQColor(Qt::yellow vs Qt::green)
---
type: QCOMPARE
message: Compared values are not the same
@@ -304,7 +316,7 @@ not ok 39 - compareQColor(Qt::yellow vs Qt::green)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 40 - compareQColor(0x88ff0000 vs 0xffff0000)
+not ok 41 - compareQColor(0x88ff0000 vs 0xffff0000)
---
type: QCOMPARE
message: Compared values are not the same
@@ -316,8 +328,8 @@ not ok 40 - compareQColor(0x88ff0000 vs 0xffff0000)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-ok 41 - compareQPixmaps(both null)
-not ok 42 - compareQPixmaps(one null)
+ok 42 - compareQPixmaps(both null)
+not ok 43 - compareQPixmaps(one null)
---
type: QCOMPARE
message: Compared QPixmaps differ.
@@ -329,7 +341,7 @@ not ok 42 - compareQPixmaps(one null)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 43 - compareQPixmaps(other null)
+not ok 44 - compareQPixmaps(other null)
---
type: QCOMPARE
message: Compared QPixmaps differ.
@@ -341,8 +353,8 @@ not ok 43 - compareQPixmaps(other null)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-ok 44 - compareQPixmaps(equal)
-not ok 45 - compareQPixmaps(different size)
+ok 45 - compareQPixmaps(equal)
+not ok 46 - compareQPixmaps(different size)
---
type: QCOMPARE
message: Compared QPixmaps differ in size.
@@ -354,14 +366,14 @@ not ok 45 - compareQPixmaps(different size)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 46 - compareQPixmaps(different pixels)
+not ok 47 - compareQPixmaps(different pixels)
---
# Compared values are not the same
at: tst_Cmptest::compareQPixmaps() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:0)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 47 - compareQPixmaps(different dpr)
+not ok 48 - compareQPixmaps(different dpr)
---
type: QCOMPARE
message: Compared QPixmaps differ in device pixel ratio.
@@ -373,8 +385,8 @@ not ok 47 - compareQPixmaps(different dpr)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-ok 48 - compareQImages(both null)
-not ok 49 - compareQImages(one null)
+ok 49 - compareQImages(both null)
+not ok 50 - compareQImages(one null)
---
type: QCOMPARE
message: Compared QImages differ.
@@ -386,7 +398,7 @@ not ok 49 - compareQImages(one null)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 50 - compareQImages(other null)
+not ok 51 - compareQImages(other null)
---
type: QCOMPARE
message: Compared QImages differ.
@@ -398,8 +410,8 @@ not ok 50 - compareQImages(other null)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-ok 51 - compareQImages(equal)
-not ok 52 - compareQImages(different size)
+ok 52 - compareQImages(equal)
+not ok 53 - compareQImages(different size)
---
type: QCOMPARE
message: Compared QImages differ in size.
@@ -411,7 +423,7 @@ not ok 52 - compareQImages(different size)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 53 - compareQImages(different format)
+not ok 54 - compareQImages(different format)
---
type: QCOMPARE
message: Compared QImages differ in format.
@@ -423,14 +435,14 @@ not ok 53 - compareQImages(different format)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 54 - compareQImages(different pixels)
+not ok 55 - compareQImages(different pixels)
---
# Compared values are not the same
at: tst_Cmptest::compareQImages() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:0)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 55 - compareQImages(different dpr)
+not ok 56 - compareQImages(different dpr)
---
type: QCOMPARE
message: Compared QImages differ in device pixel ratio.
@@ -442,8 +454,8 @@ not ok 55 - compareQImages(different dpr)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-ok 56 - compareQRegion(equal-empty)
-not ok 57 - compareQRegion(1-empty)
+ok 57 - compareQRegion(equal-empty)
+not ok 58 - compareQRegion(1-empty)
---
type: QCOMPARE
message: Compared values are not the same
@@ -455,8 +467,8 @@ not ok 57 - compareQRegion(1-empty)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-ok 58 - compareQRegion(equal)
-not ok 59 - compareQRegion(different lists)
+ok 59 - compareQRegion(equal)
+not ok 60 - compareQRegion(different lists)
---
type: QCOMPARE
message: Compared values are not the same
@@ -468,7 +480,7 @@ not ok 59 - compareQRegion(different lists)
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 60 - compareQVector2D()
+not ok 61 - compareQVector2D()
---
type: QCOMPARE
message: Compared values are not the same
@@ -480,7 +492,7 @@ not ok 60 - compareQVector2D()
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 61 - compareQVector3D()
+not ok 62 - compareQVector3D()
---
type: QCOMPARE
message: Compared values are not the same
@@ -492,7 +504,7 @@ not ok 61 - compareQVector3D()
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 62 - compareQVector4D()
+not ok 63 - compareQVector4D()
---
type: QCOMPARE
message: Compared values are not the same
@@ -504,7 +516,7 @@ not ok 62 - compareQVector4D()
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 63 - verify()
+not ok 64 - verify()
---
type: QVERIFY
message: Verification failed
@@ -516,7 +528,7 @@ not ok 63 - verify()
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 64 - verify2()
+not ok 65 - verify2()
---
type: QVERIFY
message: 42
@@ -528,7 +540,7 @@ not ok 64 - verify2()
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 65 - tryVerify()
+not ok 66 - tryVerify()
---
type: QVERIFY
message: Verification failed
@@ -540,7 +552,7 @@ not ok 65 - tryVerify()
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-not ok 66 - tryVerify2()
+not ok 67 - tryVerify2()
---
type: QVERIFY
message: 42
@@ -552,9 +564,9 @@ not ok 66 - tryVerify2()
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
line: 0
...
-ok 67 - verifyExplicitOperatorBool()
-ok 68 - cleanupTestCase()
-1..68
-# tests 68
+ok 68 - verifyExplicitOperatorBool()
+ok 69 - cleanupTestCase()
+1..69
+# tests 69
# pass 21
-# fail 47
+# fail 48
diff --git a/tests/auto/testlib/selftests/expected_cmptest.teamcity b/tests/auto/testlib/selftests/expected_cmptest.teamcity
index 2a0c3b9ff9..83e007413e 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.teamcity
+++ b/tests/auto/testlib/selftests/expected_cmptest.teamcity
@@ -49,6 +49,9 @@
##teamcity[testStarted name='compare_unknown()' flowId='tst_Cmptest']
##teamcity[testFailed name='compare_unknown()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual : a|n Expected : b' flowId='tst_Cmptest']
##teamcity[testFinished name='compare_unknown()' flowId='tst_Cmptest']
+##teamcity[testStarted name='compare_textFromDebug()' flowId='tst_Cmptest']
+##teamcity[testFailed name='compare_textFromDebug()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual (a): QDebug stream: 0|n Expected (b): QDebug stream: 1' flowId='tst_Cmptest']
+##teamcity[testFinished name='compare_textFromDebug()' flowId='tst_Cmptest']
##teamcity[testStarted name='compareQObjects()' flowId='tst_Cmptest']
##teamcity[testFailed name='compareQObjects()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared QObject pointers are not the same|n Actual (&object1): QObject/"object1"|n Expected (&object2): QObject/"object2"' flowId='tst_Cmptest']
##teamcity[testFinished name='compareQObjects()' flowId='tst_Cmptest']
diff --git a/tests/auto/testlib/selftests/expected_cmptest.txt b/tests/auto/testlib/selftests/expected_cmptest.txt
index 993cbfa53b..8547119988 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.txt
+++ b/tests/auto/testlib/selftests/expected_cmptest.txt
@@ -55,6 +55,10 @@ FAIL! : tst_Cmptest::compare_unknown() Compared values are not the same
Actual : a
Expected : b
Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)]
+FAIL! : tst_Cmptest::compare_textFromDebug() Compared values are not the same
+ Actual (a): QDebug stream: 0
+ Expected (b): QDebug stream: 1
+ Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)]
FAIL! : tst_Cmptest::compareQObjects() Compared QObject pointers are not the same
Actual (&object1): QObject/"object1"
Expected (&object2): QObject/"object2"
@@ -197,5 +201,5 @@ FAIL! : tst_Cmptest::tryVerify2() 'opaqueFunc() < 2' returned FALSE. (42)
Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)]
PASS : tst_Cmptest::verifyExplicitOperatorBool()
PASS : tst_Cmptest::cleanupTestCase()
-Totals: 21 passed, 47 failed, 0 skipped, 0 blacklisted, 0ms
+Totals: 21 passed, 48 failed, 0 skipped, 0 blacklisted, 0ms
********* Finished testing of tst_Cmptest *********
diff --git a/tests/auto/testlib/selftests/expected_cmptest.xml b/tests/auto/testlib/selftests/expected_cmptest.xml
index 08c8d4694f..f296a9e797 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.xml
+++ b/tests/auto/testlib/selftests/expected_cmptest.xml
@@ -119,6 +119,14 @@
</Incident>
<Duration msecs="0"/>
</TestFunction>
+ <TestFunction name="compare_textFromDebug">
+ <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0">
+ <Description><![CDATA[Compared values are not the same
+ Actual (a): QDebug stream: 0
+ Expected (b): QDebug stream: 1]]></Description>
+ </Incident>
+ <Duration msecs="0"/>
+ </TestFunction>
<TestFunction name="compareQObjects">
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0">
<Description><![CDATA[Compared QObject pointers are not the same
diff --git a/tests/auto/testlib/selftests/expected_testlib.junitxml b/tests/auto/testlib/selftests/expected_testlib.junitxml
index 4a8923cff9..f5d3a94126 100644
--- a/tests/auto/testlib/selftests/expected_testlib.junitxml
+++ b/tests/auto/testlib/selftests/expected_testlib.junitxml
@@ -9,7 +9,7 @@
<testcase name="basics" classname="tst_TestLib" time="@TEST_DURATION@">
<failure type="fail" message="Compared QObject pointers are not the same">
<![CDATA[ Actual (QTest::testObject()): tst_TestLib/"TestObject"
- Expected (nullptr) : <null>]]>
+ Expected (nullptr) : (nullptr)]]>
</failure>
</testcase>
<testcase name="delays" classname="tst_TestLib" time="@TEST_DURATION@"/>
diff --git a/tests/auto/testlib/selftests/expected_testlib.lightxml b/tests/auto/testlib/selftests/expected_testlib.lightxml
index 7d0c1f66c6..cd0f96d6d4 100644
--- a/tests/auto/testlib/selftests/expected_testlib.lightxml
+++ b/tests/auto/testlib/selftests/expected_testlib.lightxml
@@ -11,7 +11,7 @@
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp" line="0">
<Description><![CDATA[Compared QObject pointers are not the same
Actual (QTest::testObject()): tst_TestLib/"TestObject"
- Expected (nullptr) : <null>]]></Description>
+ Expected (nullptr) : (nullptr)]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
diff --git a/tests/auto/testlib/selftests/expected_testlib.tap b/tests/auto/testlib/selftests/expected_testlib.tap
index ed421f1241..4a6056bc77 100644
--- a/tests/auto/testlib/selftests/expected_testlib.tap
+++ b/tests/auto/testlib/selftests/expected_testlib.tap
@@ -5,9 +5,9 @@ not ok 2 - basics()
---
type: QCOMPARE
message: Compared QObject pointers are not the same
- wanted: <null> (nullptr)
+ wanted: (nullptr) (nullptr)
found: tst_TestLib/"TestObject" (QTest::testObject())
- expected: <null> (nullptr)
+ expected: (nullptr) (nullptr)
actual: tst_TestLib/"TestObject" (QTest::testObject())
at: tst_TestLib::basics() (qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp:0)
file: qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp
diff --git a/tests/auto/testlib/selftests/expected_testlib.teamcity b/tests/auto/testlib/selftests/expected_testlib.teamcity
index 4455800826..279ef03f3f 100644
--- a/tests/auto/testlib/selftests/expected_testlib.teamcity
+++ b/tests/auto/testlib/selftests/expected_testlib.teamcity
@@ -2,7 +2,7 @@
##teamcity[testStarted name='initTestCase()' flowId='tst_TestLib']
##teamcity[testFinished name='initTestCase()' flowId='tst_TestLib']
##teamcity[testStarted name='basics()' flowId='tst_TestLib']
-##teamcity[testFailed name='basics()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp(0)|]' details='Compared QObject pointers are not the same|n Actual (QTest::testObject()): tst_TestLib/"TestObject"|n Expected (nullptr) : <null>' flowId='tst_TestLib']
+##teamcity[testFailed name='basics()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp(0)|]' details='Compared QObject pointers are not the same|n Actual (QTest::testObject()): tst_TestLib/"TestObject"|n Expected (nullptr) : (nullptr)' flowId='tst_TestLib']
##teamcity[testFinished name='basics()' flowId='tst_TestLib']
##teamcity[testStarted name='delays()' flowId='tst_TestLib']
##teamcity[testFinished name='delays()' flowId='tst_TestLib']
diff --git a/tests/auto/testlib/selftests/expected_testlib.txt b/tests/auto/testlib/selftests/expected_testlib.txt
index 98ca6ecf11..a0b8a275d0 100644
--- a/tests/auto/testlib/selftests/expected_testlib.txt
+++ b/tests/auto/testlib/selftests/expected_testlib.txt
@@ -3,7 +3,7 @@ Config: Using QtTest library
PASS : tst_TestLib::initTestCase()
FAIL! : tst_TestLib::basics() Compared QObject pointers are not the same
Actual (QTest::testObject()): tst_TestLib/"TestObject"
- Expected (nullptr) : <null>
+ Expected (nullptr) : (nullptr)
Loc: [qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp(0)]
PASS : tst_TestLib::delays()
PASS : tst_TestLib::reals(zero)
diff --git a/tests/auto/testlib/selftests/expected_testlib.xml b/tests/auto/testlib/selftests/expected_testlib.xml
index a31259a9e2..241fd3f8d1 100644
--- a/tests/auto/testlib/selftests/expected_testlib.xml
+++ b/tests/auto/testlib/selftests/expected_testlib.xml
@@ -13,7 +13,7 @@
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp" line="0">
<Description><![CDATA[Compared QObject pointers are not the same
Actual (QTest::testObject()): tst_TestLib/"TestObject"
- Expected (nullptr) : <null>]]></Description>
+ Expected (nullptr) : (nullptr)]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>