summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2016-07-19 19:51:41 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2016-07-19 20:14:40 +0200
commit782ebeada125e3d8a293c7806e34cc737c30ddda (patch)
tree5516ad24a7532d650289758abd5e92a35bc2240e /tests/auto/testlib
parent091df96fb8da356dc9de81dc390f55e66d4d7c01 (diff)
parent62cbb434579a56871f0917bc306d592055381c00 (diff)
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts: qmake/library/qmakebuiltins.cpp qmake/library/qmakeevaluator.cpp qmake/library/qmakeevaluator.h qmake/project.h QMakeEvaluator: * evaluateConditional(): one side changed return type, the other changed a parameter type. * split_value_list(): one side changed a parameter adjacent to where ... * expandVariableReferences(): ... the other killed one overload and changed the survivor src/corelib/io/qlockfile_unix.cpp One side changed a #if condition, the other moved NETBSD's part of what it controlled. src/corelib/tools/qdatetime.cpp One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the other moved it from the private class to the public one, in the midst of the "short date-time" optimization, which confused diff entirely. One side changed a QStringLiteral to QLatin1String, the other rewrote adjoining code. src/network/kernel/qauthenticator.cpp Both rewrote a line, equivalently; kept the dev version. src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h One side changed #if-ery that the other removed. tools/configure/configureapp.cpp One side added a check to -target parsing; the other killed -target. tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml tests/auto/testlib/selftests/expected_cmptest.xunitxml Regenerated using generate_expected_output.py I note that quite a few other expected_* come out changed, now. There was no git-conflict in src/widgets/kernel/qformlayout.cpp but it didn't compile; one side removed some unused methods; the other found uses for one of them. Put FixedColumnMatrix<>::removeRow(int) back for its new user. Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
Diffstat (limited to 'tests/auto/testlib')
-rw-r--r--tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp25
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.lightxml77
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.teamcity66
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.txt68
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xml77
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xunitxml10
-rwxr-xr-xtests/auto/testlib/selftests/generate_expected_output.py1
7 files changed, 210 insertions, 114 deletions
diff --git a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
index ccc31cf2d3..97eb19599b 100644
--- a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+++ b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
@@ -142,6 +142,8 @@ private slots:
void compareQPixmaps_data();
void compareQImages();
void compareQImages_data();
+ void compareQRegion_data();
+ void compareQRegion();
#endif
void verify();
void verify2();
@@ -429,6 +431,29 @@ void tst_Cmptest::compareQImages()
QCOMPARE(opA, opB);
}
+
+void tst_Cmptest::compareQRegion_data()
+{
+ QTest::addColumn<QRegion>("rA");
+ QTest::addColumn<QRegion>("rB");
+ const QRect rect1(QPoint(10, 10), QSize(200, 50));
+ const QRegion region1(rect1);
+ QRegion listRegion2;
+ const QVector<QRect> list2 = QVector<QRect>() << QRect(QPoint(100, 200), QSize(50, 200)) << rect1;
+ listRegion2.setRects(list2.constData(), list2.size());
+ QTest::newRow("equal-empty") << QRegion() << QRegion();
+ QTest::newRow("1-empty") << region1 << QRegion();
+ QTest::newRow("equal") << region1 << region1;
+ QTest::newRow("different lists") << region1 << listRegion2;
+}
+
+void tst_Cmptest::compareQRegion()
+{
+ QFETCH(QRegion, rA);
+ QFETCH(QRegion, rB);
+
+ QCOMPARE(rA, rB);
+}
#endif // QT_GUI_LIB
static int opaqueFunc()
diff --git a/tests/auto/testlib/selftests/expected_cmptest.lightxml b/tests/auto/testlib/selftests/expected_cmptest.lightxml
index 89055a3a91..621aceb887 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.lightxml
+++ b/tests/auto/testlib/selftests/expected_cmptest.lightxml
@@ -8,13 +8,13 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compare_unregistered_enums">
-<Incident type="fail" file="tst_cmptest.cpp" line="158">
+<Incident type="fail" file="tst_cmptest.cpp" line="160">
<Description><![CDATA[Compared values are not the same]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compare_registered_enums">
-<Incident type="fail" file="tst_cmptest.cpp" line="164">
+<Incident type="fail" file="tst_cmptest.cpp" line="167">
<Description><![CDATA[Compared values are not the same
Actual (Qt::Monday): Monday
Expected (Qt::Sunday): Sunday]]></Description>
@@ -22,7 +22,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compare_class_enums">
-<Incident type="fail" file="tst_cmptest.cpp" line="170">
+<Incident type="fail" file="tst_cmptest.cpp" line="173">
<Description><![CDATA[Compared values are not the same
Actual (MyClassEnum::MyClassEnumValue1): MyClassEnumValue1
Expected (MyClassEnum::MyClassEnumValue2): MyClassEnumValue2]]></Description>
@@ -42,7 +42,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compare_tostring">
-<Incident type="fail" file="tst_cmptest.cpp" line="259">
+<Incident type="fail" file="tst_cmptest.cpp" line="262">
<DataTag><![CDATA[int, string]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual) : QVariant(int,123)
@@ -51,19 +51,19 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[both invalid]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="259">
+<Incident type="fail" file="tst_cmptest.cpp" line="262">
<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="259">
+<Incident type="fail" file="tst_cmptest.cpp" line="262">
<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="259">
+<Incident type="fail" file="tst_cmptest.cpp" line="262">
<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>)
@@ -78,31 +78,31 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[equal lists]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="353">
+<Incident type="fail" file="tst_cmptest.cpp" line="356">
<DataTag><![CDATA[last item different]]></DataTag>
<Description><![CDATA[Compared lists differ at index 2.
Actual (opA): "string3"
Expected (opB): "DIFFERS"]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="353">
+<Incident type="fail" file="tst_cmptest.cpp" line="356">
<DataTag><![CDATA[second-last item different]]></DataTag>
<Description><![CDATA[Compared lists differ at index 2.
Actual (opA): "string3"
Expected (opB): "DIFFERS"]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="353">
+<Incident type="fail" file="tst_cmptest.cpp" line="356">
<DataTag><![CDATA[prefix]]></DataTag>
<Description><![CDATA[Compared lists have different sizes.
Actual (opA) size: 2
Expected (opB) size: 1]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="353">
+<Incident type="fail" file="tst_cmptest.cpp" line="356">
<DataTag><![CDATA[short list second]]></DataTag>
<Description><![CDATA[Compared lists have different sizes.
Actual (opA) size: 12
Expected (opB) size: 1]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="353">
+<Incident type="fail" file="tst_cmptest.cpp" line="356">
<DataTag><![CDATA[short list first]]></DataTag>
<Description><![CDATA[Compared lists have different sizes.
Actual (opA) size: 1
@@ -111,7 +111,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compareQListInt">
-<Incident type="fail" file="tst_cmptest.cpp" line="360">
+<Incident type="fail" file="tst_cmptest.cpp" line="363">
<Description><![CDATA[Compared lists differ at index 2.
Actual (int1): 3
Expected (int2): 4]]></Description>
@@ -119,7 +119,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compareQListDouble">
-<Incident type="fail" file="tst_cmptest.cpp" line="367">
+<Incident type="fail" file="tst_cmptest.cpp" line="370">
<Description><![CDATA[Compared lists differ at index 0.
Actual (double1): 1.5
Expected (double2): 1]]></Description>
@@ -127,7 +127,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compareQColor">
-<Incident type="fail" file="tst_cmptest.cpp" line="377">
+<Incident type="fail" file="tst_cmptest.cpp" line="380">
<Description><![CDATA[Compared values are not the same
Actual (yellow): #ffff00
Expected (green) : #00ff00]]></Description>
@@ -138,13 +138,13 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[both null]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="402">
+<Incident type="fail" file="tst_cmptest.cpp" line="405">
<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="402">
+<Incident type="fail" file="tst_cmptest.cpp" line="405">
<DataTag><![CDATA[other null]]></DataTag>
<Description><![CDATA[Compared QPixmaps differ.
Actual (opA).isNull(): 0
@@ -153,13 +153,13 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[equal]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="402">
+<Incident type="fail" file="tst_cmptest.cpp" line="405">
<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="402">
+<Incident type="fail" file="tst_cmptest.cpp" line="405">
<DataTag><![CDATA[different pixels]]></DataTag>
<Description><![CDATA[Compared values are not the same]]></Description>
</Incident>
@@ -169,13 +169,13 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[both null]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="429">
+<Incident type="fail" file="tst_cmptest.cpp" line="432">
<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="429">
+<Incident type="fail" file="tst_cmptest.cpp" line="432">
<DataTag><![CDATA[other null]]></DataTag>
<Description><![CDATA[Compared QImages differ.
Actual (opA).isNull(): 0
@@ -184,44 +184,65 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[equal]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="429">
+<Incident type="fail" file="tst_cmptest.cpp" line="432">
<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="429">
+<Incident type="fail" file="tst_cmptest.cpp" line="432">
<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="429">
+<Incident type="fail" file="tst_cmptest.cpp" line="432">
<DataTag><![CDATA[different pixels]]></DataTag>
<Description><![CDATA[Compared values are not the same]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
+<TestFunction name="compareQRegion">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[equal-empty]]></DataTag>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="455">
+ <DataTag><![CDATA[1-empty]]></DataTag>
+ <Description><![CDATA[Compared values are not the same
+ Actual (rA): QRegion(200x50+10+10)
+ Expected (rB): QRegion(null)]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[equal]]></DataTag>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="455">
+ <DataTag><![CDATA[different lists]]></DataTag>
+ <Description><![CDATA[Compared values are not the same
+ Actual (rA): QRegion(200x50+10+10)
+ Expected (rB): QRegion(2 rectangles, 50x200+100+200, 200x50+10+10)]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
<TestFunction name="verify">
-<Incident type="fail" file="tst_cmptest.cpp" line="441">
+<Incident type="fail" file="tst_cmptest.cpp" line="467">
<Description><![CDATA['opaqueFunc() < 2' returned FALSE. ()]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="verify2">
-<Incident type="fail" file="tst_cmptest.cpp" line="447">
+<Incident type="fail" file="tst_cmptest.cpp" line="473">
<Description><![CDATA['opaqueFunc() < 2' returned FALSE. (42)]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="tryVerify">
-<Incident type="fail" file="tst_cmptest.cpp" line="453">
+<Incident type="fail" file="tst_cmptest.cpp" line="479">
<Description><![CDATA['opaqueFunc() < 2' returned FALSE. ()]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="tryVerify2">
-<Incident type="fail" file="tst_cmptest.cpp" line="459">
+<Incident type="fail" file="tst_cmptest.cpp" line="485">
<Description><![CDATA['opaqueFunc() < 2' returned FALSE. (42)]]></Description>
</Incident>
<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_cmptest.teamcity b/tests/auto/testlib/selftests/expected_cmptest.teamcity
index 035907ab63..8801e05e6e 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.teamcity
+++ b/tests/auto/testlib/selftests/expected_cmptest.teamcity
@@ -2,13 +2,13 @@
##teamcity[testStarted name='initTestCase()']
##teamcity[testFinished name='initTestCase()']
##teamcity[testStarted name='compare_unregistered_enums()']
-##teamcity[testFailed name='compare_unregistered_enums()' message='Failure! |[Loc: tst_cmptest.cpp(158)|]' details='Compared values are not the same']
+##teamcity[testFailed name='compare_unregistered_enums()' message='Failure! |[Loc: tst_cmptest.cpp(160)|]' details='Compared values are not the same']
##teamcity[testFinished name='compare_unregistered_enums()']
##teamcity[testStarted name='compare_registered_enums()']
-##teamcity[testFailed name='compare_registered_enums()' message='Failure! |[Loc: tst_cmptest.cpp(164)|]' details='Compared values are not the same|n Actual (Qt::Monday): Monday|n Expected (Qt::Sunday): Sunday']
+##teamcity[testFailed name='compare_registered_enums()' message='Failure! |[Loc: tst_cmptest.cpp(167)|]' details='Compared values are not the same|n Actual (Qt::Monday): Monday|n Expected (Qt::Sunday): Sunday']
##teamcity[testFinished name='compare_registered_enums()']
##teamcity[testStarted name='compare_class_enums()']
-##teamcity[testFailed name='compare_class_enums()' message='Failure! |[Loc: tst_cmptest.cpp(170)|]' details='Compared values are not the same|n Actual (MyClassEnum::MyClassEnumValue1): MyClassEnumValue1|n Expected (MyClassEnum::MyClassEnumValue2): MyClassEnumValue2']
+##teamcity[testFailed name='compare_class_enums()' message='Failure! |[Loc: tst_cmptest.cpp(173)|]' details='Compared values are not the same|n Actual (MyClassEnum::MyClassEnumValue1): MyClassEnumValue1|n Expected (MyClassEnum::MyClassEnumValue2): MyClassEnumValue2']
##teamcity[testFinished name='compare_class_enums()']
##teamcity[testStarted name='compare_boolfuncs()']
##teamcity[testFinished name='compare_boolfuncs()']
@@ -17,93 +17,103 @@
##teamcity[testStarted name='compare_pointerfuncs()']
##teamcity[testFinished name='compare_pointerfuncs()']
##teamcity[testStarted name='compare_tostring(int, string)']
-##teamcity[testFailed name='compare_tostring(int, string)' message='Failure! |[Loc: tst_cmptest.cpp(259)|]' details='Compared values are not the same|n Actual (actual) : QVariant(int,123)|n Expected (expected): QVariant(QString,hi)']
+##teamcity[testFailed name='compare_tostring(int, string)' message='Failure! |[Loc: tst_cmptest.cpp(262)|]' details='Compared values are not the same|n Actual (actual) : QVariant(int,123)|n Expected (expected): QVariant(QString,hi)']
##teamcity[testFinished name='compare_tostring(int, string)']
##teamcity[testStarted name='compare_tostring(both invalid)']
##teamcity[testFinished name='compare_tostring(both invalid)']
##teamcity[testStarted name='compare_tostring(null hash, invalid)']
-##teamcity[testFailed name='compare_tostring(null hash, invalid)' message='Failure! |[Loc: tst_cmptest.cpp(259)|]' details='Compared values are not the same|n Actual (actual) : QVariant(QVariantHash)|n Expected (expected): QVariant()']
+##teamcity[testFailed name='compare_tostring(null hash, invalid)' message='Failure! |[Loc: tst_cmptest.cpp(262)|]' details='Compared values are not the same|n Actual (actual) : QVariant(QVariantHash)|n Expected (expected): QVariant()']
##teamcity[testFinished name='compare_tostring(null hash, invalid)']
##teamcity[testStarted name='compare_tostring(string, null user type)']
-##teamcity[testFailed name='compare_tostring(string, null user type)' message='Failure! |[Loc: tst_cmptest.cpp(259)|]' details='Compared values are not the same|n Actual (actual) : QVariant(QString,A simple string)|n Expected (expected): QVariant(PhonyClass)']
+##teamcity[testFailed name='compare_tostring(string, null user type)' message='Failure! |[Loc: tst_cmptest.cpp(262)|]' details='Compared values are not the same|n Actual (actual) : QVariant(QString,A simple string)|n Expected (expected): QVariant(PhonyClass)']
##teamcity[testFinished name='compare_tostring(string, null user type)']
##teamcity[testStarted name='compare_tostring(both non-null user type)']
-##teamcity[testFailed name='compare_tostring(both non-null user type)' message='Failure! |[Loc: tst_cmptest.cpp(259)|]' details='Compared values are not the same|n Actual (actual) : QVariant(PhonyClass,<value not representable as string>)|n Expected (expected): QVariant(PhonyClass,<value not representable as string>)']
+##teamcity[testFailed name='compare_tostring(both non-null user type)' message='Failure! |[Loc: tst_cmptest.cpp(262)|]' details='Compared values are not the same|n Actual (actual) : QVariant(PhonyClass,<value not representable as string>)|n Expected (expected): QVariant(PhonyClass,<value not representable as string>)']
##teamcity[testFinished name='compare_tostring(both non-null user type)']
##teamcity[testStarted name='compareQStringLists(empty lists)']
##teamcity[testFinished name='compareQStringLists(empty lists)']
##teamcity[testStarted name='compareQStringLists(equal lists)']
##teamcity[testFinished name='compareQStringLists(equal lists)']
##teamcity[testStarted name='compareQStringLists(last item different)']
-##teamcity[testFailed name='compareQStringLists(last item different)' message='Failure! |[Loc: tst_cmptest.cpp(353)|]' details='Compared lists differ at index 2.|n Actual (opA): "string3"|n Expected (opB): "DIFFERS"']
+##teamcity[testFailed name='compareQStringLists(last item different)' message='Failure! |[Loc: tst_cmptest.cpp(356)|]' details='Compared lists differ at index 2.|n Actual (opA): "string3"|n Expected (opB): "DIFFERS"']
##teamcity[testFinished name='compareQStringLists(last item different)']
##teamcity[testStarted name='compareQStringLists(second-last item different)']
-##teamcity[testFailed name='compareQStringLists(second-last item different)' message='Failure! |[Loc: tst_cmptest.cpp(353)|]' details='Compared lists differ at index 2.|n Actual (opA): "string3"|n Expected (opB): "DIFFERS"']
+##teamcity[testFailed name='compareQStringLists(second-last item different)' message='Failure! |[Loc: tst_cmptest.cpp(356)|]' details='Compared lists differ at index 2.|n Actual (opA): "string3"|n Expected (opB): "DIFFERS"']
##teamcity[testFinished name='compareQStringLists(second-last item different)']
##teamcity[testStarted name='compareQStringLists(prefix)']
-##teamcity[testFailed name='compareQStringLists(prefix)' message='Failure! |[Loc: tst_cmptest.cpp(353)|]' details='Compared lists have different sizes.|n Actual (opA) size: 2|n Expected (opB) size: 1']
+##teamcity[testFailed name='compareQStringLists(prefix)' message='Failure! |[Loc: tst_cmptest.cpp(356)|]' details='Compared lists have different sizes.|n Actual (opA) size: 2|n Expected (opB) size: 1']
##teamcity[testFinished name='compareQStringLists(prefix)']
##teamcity[testStarted name='compareQStringLists(short list second)']
-##teamcity[testFailed name='compareQStringLists(short list second)' message='Failure! |[Loc: tst_cmptest.cpp(353)|]' details='Compared lists have different sizes.|n Actual (opA) size: 12|n Expected (opB) size: 1']
+##teamcity[testFailed name='compareQStringLists(short list second)' message='Failure! |[Loc: tst_cmptest.cpp(356)|]' details='Compared lists have different sizes.|n Actual (opA) size: 12|n Expected (opB) size: 1']
##teamcity[testFinished name='compareQStringLists(short list second)']
##teamcity[testStarted name='compareQStringLists(short list first)']
-##teamcity[testFailed name='compareQStringLists(short list first)' message='Failure! |[Loc: tst_cmptest.cpp(353)|]' details='Compared lists have different sizes.|n Actual (opA) size: 1|n Expected (opB) size: 12']
+##teamcity[testFailed name='compareQStringLists(short list first)' message='Failure! |[Loc: tst_cmptest.cpp(356)|]' details='Compared lists have different sizes.|n Actual (opA) size: 1|n Expected (opB) size: 12']
##teamcity[testFinished name='compareQStringLists(short list first)']
##teamcity[testStarted name='compareQListInt()']
-##teamcity[testFailed name='compareQListInt()' message='Failure! |[Loc: tst_cmptest.cpp(360)|]' details='Compared lists differ at index 2.|n Actual (int1): 3|n Expected (int2): 4']
+##teamcity[testFailed name='compareQListInt()' message='Failure! |[Loc: tst_cmptest.cpp(363)|]' details='Compared lists differ at index 2.|n Actual (int1): 3|n Expected (int2): 4']
##teamcity[testFinished name='compareQListInt()']
##teamcity[testStarted name='compareQListDouble()']
-##teamcity[testFailed name='compareQListDouble()' message='Failure! |[Loc: tst_cmptest.cpp(367)|]' details='Compared lists differ at index 0.|n Actual (double1): 1.5|n Expected (double2): 1']
+##teamcity[testFailed name='compareQListDouble()' message='Failure! |[Loc: tst_cmptest.cpp(370)|]' details='Compared lists differ at index 0.|n Actual (double1): 1.5|n Expected (double2): 1']
##teamcity[testFinished name='compareQListDouble()']
##teamcity[testStarted name='compareQColor()']
-##teamcity[testFailed name='compareQColor()' message='Failure! |[Loc: tst_cmptest.cpp(377)|]' details='Compared values are not the same|n Actual (yellow): #ffff00|n Expected (green) : #00ff00']
+##teamcity[testFailed name='compareQColor()' message='Failure! |[Loc: tst_cmptest.cpp(380)|]' details='Compared values are not the same|n Actual (yellow): #ffff00|n Expected (green) : #00ff00']
##teamcity[testFinished name='compareQColor()']
##teamcity[testStarted name='compareQPixmaps(both null)']
##teamcity[testFinished name='compareQPixmaps(both null)']
##teamcity[testStarted name='compareQPixmaps(one null)']
-##teamcity[testFailed name='compareQPixmaps(one null)' message='Failure! |[Loc: tst_cmptest.cpp(402)|]' details='Compared QPixmaps differ.|n Actual (opA).isNull(): 1|n Expected (opB).isNull(): 0']
+##teamcity[testFailed name='compareQPixmaps(one null)' message='Failure! |[Loc: tst_cmptest.cpp(405)|]' details='Compared QPixmaps differ.|n Actual (opA).isNull(): 1|n Expected (opB).isNull(): 0']
##teamcity[testFinished name='compareQPixmaps(one null)']
##teamcity[testStarted name='compareQPixmaps(other null)']
-##teamcity[testFailed name='compareQPixmaps(other null)' message='Failure! |[Loc: tst_cmptest.cpp(402)|]' details='Compared QPixmaps differ.|n Actual (opA).isNull(): 0|n Expected (opB).isNull(): 1']
+##teamcity[testFailed name='compareQPixmaps(other null)' message='Failure! |[Loc: tst_cmptest.cpp(405)|]' details='Compared QPixmaps differ.|n Actual (opA).isNull(): 0|n Expected (opB).isNull(): 1']
##teamcity[testFinished name='compareQPixmaps(other null)']
##teamcity[testStarted name='compareQPixmaps(equal)']
##teamcity[testFinished name='compareQPixmaps(equal)']
##teamcity[testStarted name='compareQPixmaps(different size)']
-##teamcity[testFailed name='compareQPixmaps(different size)' message='Failure! |[Loc: tst_cmptest.cpp(402)|]' details='Compared QPixmaps differ in size.|n Actual (opA): 11x20|n Expected (opB): 20x20']
+##teamcity[testFailed name='compareQPixmaps(different size)' message='Failure! |[Loc: tst_cmptest.cpp(405)|]' details='Compared QPixmaps differ in size.|n Actual (opA): 11x20|n Expected (opB): 20x20']
##teamcity[testFinished name='compareQPixmaps(different size)']
##teamcity[testStarted name='compareQPixmaps(different pixels)']
-##teamcity[testFailed name='compareQPixmaps(different pixels)' message='Failure! |[Loc: tst_cmptest.cpp(402)|]' details='Compared values are not the same']
+##teamcity[testFailed name='compareQPixmaps(different pixels)' message='Failure! |[Loc: tst_cmptest.cpp(405)|]' details='Compared values are not the same']
##teamcity[testFinished name='compareQPixmaps(different pixels)']
##teamcity[testStarted name='compareQImages(both null)']
##teamcity[testFinished name='compareQImages(both null)']
##teamcity[testStarted name='compareQImages(one null)']
-##teamcity[testFailed name='compareQImages(one null)' message='Failure! |[Loc: tst_cmptest.cpp(429)|]' details='Compared QImages differ.|n Actual (opA).isNull(): 1|n Expected (opB).isNull(): 0']
+##teamcity[testFailed name='compareQImages(one null)' message='Failure! |[Loc: tst_cmptest.cpp(432)|]' details='Compared QImages differ.|n Actual (opA).isNull(): 1|n Expected (opB).isNull(): 0']
##teamcity[testFinished name='compareQImages(one null)']
##teamcity[testStarted name='compareQImages(other null)']
-##teamcity[testFailed name='compareQImages(other null)' message='Failure! |[Loc: tst_cmptest.cpp(429)|]' details='Compared QImages differ.|n Actual (opA).isNull(): 0|n Expected (opB).isNull(): 1']
+##teamcity[testFailed name='compareQImages(other null)' message='Failure! |[Loc: tst_cmptest.cpp(432)|]' details='Compared QImages differ.|n Actual (opA).isNull(): 0|n Expected (opB).isNull(): 1']
##teamcity[testFinished name='compareQImages(other null)']
##teamcity[testStarted name='compareQImages(equal)']
##teamcity[testFinished name='compareQImages(equal)']
##teamcity[testStarted name='compareQImages(different size)']
-##teamcity[testFailed name='compareQImages(different size)' message='Failure! |[Loc: tst_cmptest.cpp(429)|]' details='Compared QImages differ in size.|n Actual (opA): 11x20|n Expected (opB): 20x20']
+##teamcity[testFailed name='compareQImages(different size)' message='Failure! |[Loc: tst_cmptest.cpp(432)|]' details='Compared QImages differ in size.|n Actual (opA): 11x20|n Expected (opB): 20x20']
##teamcity[testFinished name='compareQImages(different size)']
##teamcity[testStarted name='compareQImages(different format)']
-##teamcity[testFailed name='compareQImages(different format)' message='Failure! |[Loc: tst_cmptest.cpp(429)|]' details='Compared QImages differ in format.|n Actual (opA): 6|n Expected (opB): 3']
+##teamcity[testFailed name='compareQImages(different format)' message='Failure! |[Loc: tst_cmptest.cpp(432)|]' details='Compared QImages differ in format.|n Actual (opA): 6|n Expected (opB): 3']
##teamcity[testFinished name='compareQImages(different format)']
##teamcity[testStarted name='compareQImages(different pixels)']
-##teamcity[testFailed name='compareQImages(different pixels)' message='Failure! |[Loc: tst_cmptest.cpp(429)|]' details='Compared values are not the same']
+##teamcity[testFailed name='compareQImages(different pixels)' message='Failure! |[Loc: tst_cmptest.cpp(432)|]' details='Compared values are not the same']
##teamcity[testFinished name='compareQImages(different pixels)']
+##teamcity[testStarted name='compareQRegion(equal-empty)']
+##teamcity[testFinished name='compareQRegion(equal-empty)']
+##teamcity[testStarted name='compareQRegion(1-empty)']
+##teamcity[testFailed name='compareQRegion(1-empty)' message='Failure! |[Loc: tst_cmptest.cpp(455)|]' details='Compared values are not the same|n Actual (rA): QRegion(200x50+10+10)|n Expected (rB): QRegion(null)']
+##teamcity[testFinished name='compareQRegion(1-empty)']
+##teamcity[testStarted name='compareQRegion(equal)']
+##teamcity[testFinished name='compareQRegion(equal)']
+##teamcity[testStarted name='compareQRegion(different lists)']
+##teamcity[testFailed name='compareQRegion(different lists)' message='Failure! |[Loc: tst_cmptest.cpp(455)|]' details='Compared values are not the same|n Actual (rA): QRegion(200x50+10+10)|n Expected (rB): QRegion(2 rectangles, 50x200+100+200, 200x50+10+10)']
+##teamcity[testFinished name='compareQRegion(different lists)']
##teamcity[testStarted name='verify()']
-##teamcity[testFailed name='verify()' message='Failure! |[Loc: tst_cmptest.cpp(441)|]' details='|'opaqueFunc() < 2|' returned FALSE. ()']
+##teamcity[testFailed name='verify()' message='Failure! |[Loc: tst_cmptest.cpp(467)|]' details='|'opaqueFunc() < 2|' returned FALSE. ()']
##teamcity[testFinished name='verify()']
##teamcity[testStarted name='verify2()']
-##teamcity[testFailed name='verify2()' message='Failure! |[Loc: tst_cmptest.cpp(447)|]' details='|'opaqueFunc() < 2|' returned FALSE. (42)']
+##teamcity[testFailed name='verify2()' message='Failure! |[Loc: tst_cmptest.cpp(473)|]' details='|'opaqueFunc() < 2|' returned FALSE. (42)']
##teamcity[testFinished name='verify2()']
##teamcity[testStarted name='tryVerify()']
-##teamcity[testFailed name='tryVerify()' message='Failure! |[Loc: tst_cmptest.cpp(453)|]' details='|'opaqueFunc() < 2|' returned FALSE. ()']
+##teamcity[testFailed name='tryVerify()' message='Failure! |[Loc: tst_cmptest.cpp(479)|]' details='|'opaqueFunc() < 2|' returned FALSE. ()']
##teamcity[testFinished name='tryVerify()']
##teamcity[testStarted name='tryVerify2()']
-##teamcity[testFailed name='tryVerify2()' message='Failure! |[Loc: tst_cmptest.cpp(459)|]' details='|'opaqueFunc() < 2|' returned FALSE. (42)']
+##teamcity[testFailed name='tryVerify2()' message='Failure! |[Loc: tst_cmptest.cpp(485)|]' details='|'opaqueFunc() < 2|' returned FALSE. (42)']
##teamcity[testFinished name='tryVerify2()']
##teamcity[testStarted name='verifyExplicitOperatorBool()']
##teamcity[testFinished name='verifyExplicitOperatorBool()']
diff --git a/tests/auto/testlib/selftests/expected_cmptest.txt b/tests/auto/testlib/selftests/expected_cmptest.txt
index 9d125b3602..9c7f56e6c3 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.txt
+++ b/tests/auto/testlib/selftests/expected_cmptest.txt
@@ -2,114 +2,124 @@
Config: Using QtTest library
PASS : tst_Cmptest::initTestCase()
FAIL! : tst_Cmptest::compare_unregistered_enums() Compared values are not the same
- Loc: [tst_cmptest.cpp(158)]
+ Loc: [tst_cmptest.cpp(160)]
FAIL! : tst_Cmptest::compare_registered_enums() Compared values are not the same
Actual (Qt::Monday): Monday
Expected (Qt::Sunday): Sunday
- Loc: [tst_cmptest.cpp(164)]
+ Loc: [tst_cmptest.cpp(167)]
FAIL! : tst_Cmptest::compare_class_enums() Compared values are not the same
Actual (MyClassEnum::MyClassEnumValue1): MyClassEnumValue1
Expected (MyClassEnum::MyClassEnumValue2): MyClassEnumValue2
- Loc: [tst_cmptest.cpp(170)]
+ Loc: [tst_cmptest.cpp(173)]
PASS : tst_Cmptest::compare_boolfuncs()
PASS : tst_Cmptest::compare_to_nullptr()
PASS : tst_Cmptest::compare_pointerfuncs()
FAIL! : tst_Cmptest::compare_tostring(int, string) Compared values are not the same
Actual (actual) : QVariant(int,123)
Expected (expected): QVariant(QString,hi)
- Loc: [tst_cmptest.cpp(259)]
+ Loc: [tst_cmptest.cpp(262)]
PASS : tst_Cmptest::compare_tostring(both invalid)
FAIL! : tst_Cmptest::compare_tostring(null hash, invalid) Compared values are not the same
Actual (actual) : QVariant(QVariantHash)
Expected (expected): QVariant()
- Loc: [tst_cmptest.cpp(259)]
+ Loc: [tst_cmptest.cpp(262)]
FAIL! : tst_Cmptest::compare_tostring(string, null user type) Compared values are not the same
Actual (actual) : QVariant(QString,A simple string)
Expected (expected): QVariant(PhonyClass)
- Loc: [tst_cmptest.cpp(259)]
+ Loc: [tst_cmptest.cpp(262)]
FAIL! : tst_Cmptest::compare_tostring(both non-null user type) Compared values are not the same
Actual (actual) : QVariant(PhonyClass,<value not representable as string>)
Expected (expected): QVariant(PhonyClass,<value not representable as string>)
- Loc: [tst_cmptest.cpp(259)]
+ Loc: [tst_cmptest.cpp(262)]
PASS : tst_Cmptest::compareQStringLists(empty lists)
PASS : tst_Cmptest::compareQStringLists(equal lists)
FAIL! : tst_Cmptest::compareQStringLists(last item different) Compared lists differ at index 2.
Actual (opA): "string3"
Expected (opB): "DIFFERS"
- Loc: [tst_cmptest.cpp(353)]
+ Loc: [tst_cmptest.cpp(356)]
FAIL! : tst_Cmptest::compareQStringLists(second-last item different) Compared lists differ at index 2.
Actual (opA): "string3"
Expected (opB): "DIFFERS"
- Loc: [tst_cmptest.cpp(353)]
+ Loc: [tst_cmptest.cpp(356)]
FAIL! : tst_Cmptest::compareQStringLists(prefix) Compared lists have different sizes.
Actual (opA) size: 2
Expected (opB) size: 1
- Loc: [tst_cmptest.cpp(353)]
+ Loc: [tst_cmptest.cpp(356)]
FAIL! : tst_Cmptest::compareQStringLists(short list second) Compared lists have different sizes.
Actual (opA) size: 12
Expected (opB) size: 1
- Loc: [tst_cmptest.cpp(353)]
+ Loc: [tst_cmptest.cpp(356)]
FAIL! : tst_Cmptest::compareQStringLists(short list first) Compared lists have different sizes.
Actual (opA) size: 1
Expected (opB) size: 12
- Loc: [tst_cmptest.cpp(353)]
+ Loc: [tst_cmptest.cpp(356)]
FAIL! : tst_Cmptest::compareQListInt() Compared lists differ at index 2.
Actual (int1): 3
Expected (int2): 4
- Loc: [tst_cmptest.cpp(360)]
+ Loc: [tst_cmptest.cpp(363)]
FAIL! : tst_Cmptest::compareQListDouble() Compared lists differ at index 0.
Actual (double1): 1.5
Expected (double2): 1
- Loc: [tst_cmptest.cpp(367)]
+ Loc: [tst_cmptest.cpp(370)]
FAIL! : tst_Cmptest::compareQColor() Compared values are not the same
Actual (yellow): #ffff00
Expected (green) : #00ff00
- Loc: [tst_cmptest.cpp(377)]
+ Loc: [tst_cmptest.cpp(380)]
PASS : tst_Cmptest::compareQPixmaps(both null)
FAIL! : tst_Cmptest::compareQPixmaps(one null) Compared QPixmaps differ.
Actual (opA).isNull(): 1
Expected (opB).isNull(): 0
- Loc: [tst_cmptest.cpp(402)]
+ Loc: [tst_cmptest.cpp(405)]
FAIL! : tst_Cmptest::compareQPixmaps(other null) Compared QPixmaps differ.
Actual (opA).isNull(): 0
Expected (opB).isNull(): 1
- Loc: [tst_cmptest.cpp(402)]
+ Loc: [tst_cmptest.cpp(405)]
PASS : tst_Cmptest::compareQPixmaps(equal)
FAIL! : tst_Cmptest::compareQPixmaps(different size) Compared QPixmaps differ in size.
Actual (opA): 11x20
Expected (opB): 20x20
- Loc: [tst_cmptest.cpp(402)]
+ Loc: [tst_cmptest.cpp(405)]
FAIL! : tst_Cmptest::compareQPixmaps(different pixels) Compared values are not the same
- Loc: [tst_cmptest.cpp(402)]
+ Loc: [tst_cmptest.cpp(405)]
PASS : tst_Cmptest::compareQImages(both null)
FAIL! : tst_Cmptest::compareQImages(one null) Compared QImages differ.
Actual (opA).isNull(): 1
Expected (opB).isNull(): 0
- Loc: [tst_cmptest.cpp(429)]
+ Loc: [tst_cmptest.cpp(432)]
FAIL! : tst_Cmptest::compareQImages(other null) Compared QImages differ.
Actual (opA).isNull(): 0
Expected (opB).isNull(): 1
- Loc: [tst_cmptest.cpp(429)]
+ Loc: [tst_cmptest.cpp(432)]
PASS : tst_Cmptest::compareQImages(equal)
FAIL! : tst_Cmptest::compareQImages(different size) Compared QImages differ in size.
Actual (opA): 11x20
Expected (opB): 20x20
- Loc: [tst_cmptest.cpp(429)]
+ Loc: [tst_cmptest.cpp(432)]
FAIL! : tst_Cmptest::compareQImages(different format) Compared QImages differ in format.
Actual (opA): 6
Expected (opB): 3
- Loc: [tst_cmptest.cpp(429)]
+ Loc: [tst_cmptest.cpp(432)]
FAIL! : tst_Cmptest::compareQImages(different pixels) Compared values are not the same
- Loc: [tst_cmptest.cpp(429)]
+ Loc: [tst_cmptest.cpp(432)]
+PASS : tst_Cmptest::compareQRegion(equal-empty)
+FAIL! : tst_Cmptest::compareQRegion(1-empty) Compared values are not the same
+ Actual (rA): QRegion(200x50+10+10)
+ Expected (rB): QRegion(null)
+ Loc: [tst_cmptest.cpp(455)]
+PASS : tst_Cmptest::compareQRegion(equal)
+FAIL! : tst_Cmptest::compareQRegion(different lists) Compared values are not the same
+ Actual (rA): QRegion(200x50+10+10)
+ Expected (rB): QRegion(2 rectangles, 50x200+100+200, 200x50+10+10)
+ Loc: [tst_cmptest.cpp(455)]
FAIL! : tst_Cmptest::verify() 'opaqueFunc() < 2' returned FALSE. ()
- Loc: [tst_cmptest.cpp(441)]
+ Loc: [tst_cmptest.cpp(467)]
FAIL! : tst_Cmptest::verify2() 'opaqueFunc() < 2' returned FALSE. (42)
- Loc: [tst_cmptest.cpp(447)]
+ Loc: [tst_cmptest.cpp(473)]
FAIL! : tst_Cmptest::tryVerify() 'opaqueFunc() < 2' returned FALSE. ()
- Loc: [tst_cmptest.cpp(453)]
+ Loc: [tst_cmptest.cpp(479)]
FAIL! : tst_Cmptest::tryVerify2() 'opaqueFunc() < 2' returned FALSE. (42)
- Loc: [tst_cmptest.cpp(459)]
+ Loc: [tst_cmptest.cpp(485)]
PASS : tst_Cmptest::verifyExplicitOperatorBool()
PASS : tst_Cmptest::cleanupTestCase()
-Totals: 13 passed, 28 failed, 0 skipped, 0 blacklisted, 246ms
+Totals: 15 passed, 30 failed, 0 skipped, 0 blacklisted, 244ms
********* Finished testing of tst_Cmptest *********
diff --git a/tests/auto/testlib/selftests/expected_cmptest.xml b/tests/auto/testlib/selftests/expected_cmptest.xml
index 776560f639..f64ffe3792 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.xml
+++ b/tests/auto/testlib/selftests/expected_cmptest.xml
@@ -10,13 +10,13 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compare_unregistered_enums">
-<Incident type="fail" file="tst_cmptest.cpp" line="158">
+<Incident type="fail" file="tst_cmptest.cpp" line="160">
<Description><![CDATA[Compared values are not the same]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compare_registered_enums">
-<Incident type="fail" file="tst_cmptest.cpp" line="164">
+<Incident type="fail" file="tst_cmptest.cpp" line="167">
<Description><![CDATA[Compared values are not the same
Actual (Qt::Monday): Monday
Expected (Qt::Sunday): Sunday]]></Description>
@@ -24,7 +24,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compare_class_enums">
-<Incident type="fail" file="tst_cmptest.cpp" line="170">
+<Incident type="fail" file="tst_cmptest.cpp" line="173">
<Description><![CDATA[Compared values are not the same
Actual (MyClassEnum::MyClassEnumValue1): MyClassEnumValue1
Expected (MyClassEnum::MyClassEnumValue2): MyClassEnumValue2]]></Description>
@@ -44,7 +44,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compare_tostring">
-<Incident type="fail" file="tst_cmptest.cpp" line="259">
+<Incident type="fail" file="tst_cmptest.cpp" line="262">
<DataTag><![CDATA[int, string]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual) : QVariant(int,123)
@@ -53,19 +53,19 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[both invalid]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="259">
+<Incident type="fail" file="tst_cmptest.cpp" line="262">
<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="259">
+<Incident type="fail" file="tst_cmptest.cpp" line="262">
<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="259">
+<Incident type="fail" file="tst_cmptest.cpp" line="262">
<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>)
@@ -80,31 +80,31 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[equal lists]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="353">
+<Incident type="fail" file="tst_cmptest.cpp" line="356">
<DataTag><![CDATA[last item different]]></DataTag>
<Description><![CDATA[Compared lists differ at index 2.
Actual (opA): "string3"
Expected (opB): "DIFFERS"]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="353">
+<Incident type="fail" file="tst_cmptest.cpp" line="356">
<DataTag><![CDATA[second-last item different]]></DataTag>
<Description><![CDATA[Compared lists differ at index 2.
Actual (opA): "string3"
Expected (opB): "DIFFERS"]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="353">
+<Incident type="fail" file="tst_cmptest.cpp" line="356">
<DataTag><![CDATA[prefix]]></DataTag>
<Description><![CDATA[Compared lists have different sizes.
Actual (opA) size: 2
Expected (opB) size: 1]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="353">
+<Incident type="fail" file="tst_cmptest.cpp" line="356">
<DataTag><![CDATA[short list second]]></DataTag>
<Description><![CDATA[Compared lists have different sizes.
Actual (opA) size: 12
Expected (opB) size: 1]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="353">
+<Incident type="fail" file="tst_cmptest.cpp" line="356">
<DataTag><![CDATA[short list first]]></DataTag>
<Description><![CDATA[Compared lists have different sizes.
Actual (opA) size: 1
@@ -113,7 +113,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compareQListInt">
-<Incident type="fail" file="tst_cmptest.cpp" line="360">
+<Incident type="fail" file="tst_cmptest.cpp" line="363">
<Description><![CDATA[Compared lists differ at index 2.
Actual (int1): 3
Expected (int2): 4]]></Description>
@@ -121,7 +121,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compareQListDouble">
-<Incident type="fail" file="tst_cmptest.cpp" line="367">
+<Incident type="fail" file="tst_cmptest.cpp" line="370">
<Description><![CDATA[Compared lists differ at index 0.
Actual (double1): 1.5
Expected (double2): 1]]></Description>
@@ -129,7 +129,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compareQColor">
-<Incident type="fail" file="tst_cmptest.cpp" line="377">
+<Incident type="fail" file="tst_cmptest.cpp" line="380">
<Description><![CDATA[Compared values are not the same
Actual (yellow): #ffff00
Expected (green) : #00ff00]]></Description>
@@ -140,13 +140,13 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[both null]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="402">
+<Incident type="fail" file="tst_cmptest.cpp" line="405">
<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="402">
+<Incident type="fail" file="tst_cmptest.cpp" line="405">
<DataTag><![CDATA[other null]]></DataTag>
<Description><![CDATA[Compared QPixmaps differ.
Actual (opA).isNull(): 0
@@ -155,13 +155,13 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[equal]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="402">
+<Incident type="fail" file="tst_cmptest.cpp" line="405">
<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="402">
+<Incident type="fail" file="tst_cmptest.cpp" line="405">
<DataTag><![CDATA[different pixels]]></DataTag>
<Description><![CDATA[Compared values are not the same]]></Description>
</Incident>
@@ -171,13 +171,13 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[both null]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="429">
+<Incident type="fail" file="tst_cmptest.cpp" line="432">
<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="429">
+<Incident type="fail" file="tst_cmptest.cpp" line="432">
<DataTag><![CDATA[other null]]></DataTag>
<Description><![CDATA[Compared QImages differ.
Actual (opA).isNull(): 0
@@ -186,44 +186,65 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[equal]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="429">
+<Incident type="fail" file="tst_cmptest.cpp" line="432">
<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="429">
+<Incident type="fail" file="tst_cmptest.cpp" line="432">
<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="429">
+<Incident type="fail" file="tst_cmptest.cpp" line="432">
<DataTag><![CDATA[different pixels]]></DataTag>
<Description><![CDATA[Compared values are not the same]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
+<TestFunction name="compareQRegion">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[equal-empty]]></DataTag>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="455">
+ <DataTag><![CDATA[1-empty]]></DataTag>
+ <Description><![CDATA[Compared values are not the same
+ Actual (rA): QRegion(200x50+10+10)
+ Expected (rB): QRegion(null)]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[equal]]></DataTag>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="455">
+ <DataTag><![CDATA[different lists]]></DataTag>
+ <Description><![CDATA[Compared values are not the same
+ Actual (rA): QRegion(200x50+10+10)
+ Expected (rB): QRegion(2 rectangles, 50x200+100+200, 200x50+10+10)]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
<TestFunction name="verify">
-<Incident type="fail" file="tst_cmptest.cpp" line="441">
+<Incident type="fail" file="tst_cmptest.cpp" line="467">
<Description><![CDATA['opaqueFunc() < 2' returned FALSE. ()]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="verify2">
-<Incident type="fail" file="tst_cmptest.cpp" line="447">
+<Incident type="fail" file="tst_cmptest.cpp" line="473">
<Description><![CDATA['opaqueFunc() < 2' returned FALSE. (42)]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="tryVerify">
-<Incident type="fail" file="tst_cmptest.cpp" line="453">
+<Incident type="fail" file="tst_cmptest.cpp" line="479">
<Description><![CDATA['opaqueFunc() < 2' returned FALSE. ()]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="tryVerify2">
-<Incident type="fail" file="tst_cmptest.cpp" line="459">
+<Incident type="fail" file="tst_cmptest.cpp" line="485">
<Description><![CDATA['opaqueFunc() < 2' returned FALSE. (42)]]></Description>
</Incident>
<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_cmptest.xunitxml b/tests/auto/testlib/selftests/expected_cmptest.xunitxml
index 4299b99846..de47ac97f5 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.xunitxml
+++ b/tests/auto/testlib/selftests/expected_cmptest.xunitxml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<testsuite errors="0" failures="28" tests="20" name="tst_Cmptest">
+<testsuite errors="0" failures="30" tests="21" name="tst_Cmptest">
<properties>
<property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
<property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
@@ -95,6 +95,14 @@
Expected (opB): 3" result="fail"/>
<failure tag="different pixels" message="Compared values are not the same" result="fail"/>
</testcase>
+ <testcase result="fail" name="compareQRegion">
+ <failure tag="1&#x002D;empty" message="Compared values are not the same
+ Actual (rA): QRegion(200x50+10+10)
+ Expected (rB): QRegion(null)" result="fail"/>
+ <failure tag="different lists" message="Compared values are not the same
+ Actual (rA): QRegion(200x50+10+10)
+ Expected (rB): QRegion(2 rectangles, 50x200+100+200, 200x50+10+10)" result="fail"/>
+ </testcase>
<testcase result="fail" name="verify">
<failure message="&apos;opaqueFunc() &lt; 2&apos; returned FALSE. ()" result="fail"/>
</testcase>
diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py
index aed8829ed6..66a75a304f 100755
--- a/tests/auto/testlib/selftests/generate_expected_output.py
+++ b/tests/auto/testlib/selftests/generate_expected_output.py
@@ -104,6 +104,7 @@ if isWindows:
exit()
tests = sys.argv[1:]
+os.environ['LC_ALL'] = 'C'
if len(tests) == 0:
tests = subdirs()
print("Generating " + str(len(tests)) + " test results for: " + qtver + " in: " + rootPath)