summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/testlib/selftests')
-rw-r--r--tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp62
-rw-r--r--tests/auto/testlib/selftests/expected_assert.tap16
-rw-r--r--tests/auto/testlib/selftests/expected_badxml.tap61
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibcounting.tap17
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibeventcounter.tap15
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibtickcounter.tap9
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibwalltime.tap11
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.lightxml36
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.tap456
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.teamcity16
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.txt20
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xml36
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xunitxml18
-rw-r--r--tests/auto/testlib/selftests/expected_commandlinedata.tap20
-rw-r--r--tests/auto/testlib/selftests/expected_counting.tap118
-rw-r--r--tests/auto/testlib/selftests/expected_crashes_4.txt7
-rw-r--r--tests/auto/testlib/selftests/expected_datatable.tap183
-rw-r--r--tests/auto/testlib/selftests/expected_datetime.tap46
-rw-r--r--tests/auto/testlib/selftests/expected_exceptionthrow.tap14
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.tap96
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanup.tap20
-rw-r--r--tests/auto/testlib/selftests/expected_failinit.tap19
-rw-r--r--tests/auto/testlib/selftests/expected_failinitdata.tap18
-rw-r--r--tests/auto/testlib/selftests/expected_fetchbogus.tap15
-rw-r--r--tests/auto/testlib/selftests/expected_findtestdata.tap10
-rw-r--r--tests/auto/testlib/selftests/expected_float.tap82
-rw-r--r--tests/auto/testlib/selftests/expected_globaldata.tap52
-rw-r--r--tests/auto/testlib/selftests/expected_keyboard.lightxml18
-rw-r--r--tests/auto/testlib/selftests/expected_keyboard.tap9
-rw-r--r--tests/auto/testlib/selftests/expected_keyboard.teamcity8
-rw-r--r--tests/auto/testlib/selftests/expected_keyboard.txt7
-rw-r--r--tests/auto/testlib/selftests/expected_keyboard.xml21
-rw-r--r--tests/auto/testlib/selftests/expected_keyboard.xunitxml12
-rw-r--r--tests/auto/testlib/selftests/expected_longstring.tap23
-rw-r--r--tests/auto/testlib/selftests/expected_maxwarnings.tap2011
-rw-r--r--tests/auto/testlib/selftests/expected_pairdiagnostics.tap32
-rw-r--r--tests/auto/testlib/selftests/expected_singleskip.tap9
-rw-r--r--tests/auto/testlib/selftests/expected_skip.tap13
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanup.tap9
-rw-r--r--tests/auto/testlib/selftests/expected_skipinit.tap8
-rw-r--r--tests/auto/testlib/selftests/expected_skipinitdata.tap7
-rw-r--r--tests/auto/testlib/selftests/expected_sleep.tap9
-rw-r--r--tests/auto/testlib/selftests/expected_strcmp.tap87
-rw-r--r--tests/auto/testlib/selftests/expected_subtest.tap68
-rw-r--r--tests/auto/testlib/selftests/expected_tuplediagnostics.lightxml34
-rw-r--r--tests/auto/testlib/selftests/expected_tuplediagnostics.tap33
-rw-r--r--tests/auto/testlib/selftests/expected_tuplediagnostics.teamcity14
-rw-r--r--tests/auto/testlib/selftests/expected_tuplediagnostics.txt15
-rw-r--r--tests/auto/testlib/selftests/expected_tuplediagnostics.xml37
-rw-r--r--tests/auto/testlib/selftests/expected_tuplediagnostics.xunitxml22
-rw-r--r--tests/auto/testlib/selftests/expected_verbose1.tap118
-rw-r--r--tests/auto/testlib/selftests/expected_verbose2.tap136
-rw-r--r--tests/auto/testlib/selftests/expected_verifyexceptionthrown.tap53
-rw-r--r--tests/auto/testlib/selftests/expected_warnings.tap42
-rw-r--r--tests/auto/testlib/selftests/expected_xunit.tap44
-rwxr-xr-xtests/auto/testlib/selftests/generate_expected_output.py28
-rw-r--r--tests/auto/testlib/selftests/keyboard/keyboard.pro7
-rw-r--r--tests/auto/testlib/selftests/keyboard/tst_keyboard.cpp88
-rw-r--r--tests/auto/testlib/selftests/selftests.pri6
-rw-r--r--tests/auto/testlib/selftests/selftests.qrc219
-rw-r--r--tests/auto/testlib/selftests/test/test.pro4
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp395
-rw-r--r--tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp65
-rw-r--r--tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro6
64 files changed, 4795 insertions, 395 deletions
diff --git a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
index a662fea615..8e2c7694a5 100644
--- a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+++ b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
@@ -130,6 +130,10 @@ private slots:
void compare_unregistered_enums();
void compare_registered_enums();
void compare_class_enums();
+ void test_windowflags_data();
+ void test_windowflags();
+ void test_unregistered_flags_data();
+ void test_unregistered_flags();
void compare_boolfuncs();
void compare_to_nullptr();
void compare_pointerfuncs();
@@ -180,6 +184,64 @@ void tst_Cmptest::compare_class_enums()
QCOMPARE(MyClassEnum::MyClassEnumValue1, MyClassEnum::MyClassEnumValue2);
}
+void tst_Cmptest::test_windowflags_data()
+{
+ QTest::addColumn<Qt::WindowFlags>("actualWindowFlags");
+ QTest::addColumn<Qt::WindowFlags>("expectedWindowFlags");
+
+ const Qt::WindowFlags windowFlags = Qt::Window
+ | Qt::WindowSystemMenuHint | Qt::WindowStaysOnBottomHint;
+ QTest::newRow("pass")
+ << windowFlags
+ << windowFlags;
+ QTest::newRow("fail1")
+ << windowFlags
+ << (windowFlags | Qt::FramelessWindowHint);
+ QTest::newRow("fail2")
+ << Qt::WindowFlags(Qt::Window)
+ << Qt::WindowFlags(Qt::Window | Qt::FramelessWindowHint);
+}
+
+void tst_Cmptest::test_windowflags()
+{
+ QFETCH(Qt::WindowFlags, actualWindowFlags);
+ QFETCH(Qt::WindowFlags, expectedWindowFlags);
+ QCOMPARE(actualWindowFlags, expectedWindowFlags);
+}
+
+enum UnregisteredEnum {
+ UnregisteredEnumValue1 = 0x1,
+ UnregisteredEnumValue2 = 0x2,
+ UnregisteredEnumValue3 = 0x4
+};
+
+typedef QFlags<UnregisteredEnum> UnregisteredFlags;
+
+Q_DECLARE_METATYPE(UnregisteredFlags);
+
+void tst_Cmptest::test_unregistered_flags_data()
+{
+ QTest::addColumn<UnregisteredFlags>("actualFlags");
+ QTest::addColumn<UnregisteredFlags>("expectedFlags");
+
+ QTest::newRow("pass")
+ << UnregisteredFlags(UnregisteredEnumValue1)
+ << UnregisteredFlags(UnregisteredEnumValue1);
+ QTest::newRow("fail1")
+ << UnregisteredFlags(UnregisteredEnumValue1 | UnregisteredEnumValue2)
+ << UnregisteredFlags(UnregisteredEnumValue1 | UnregisteredEnumValue3);
+ QTest::newRow("fail2")
+ << UnregisteredFlags(UnregisteredEnumValue1)
+ << UnregisteredFlags(UnregisteredEnumValue1 | UnregisteredEnumValue3);
+}
+
+void tst_Cmptest::test_unregistered_flags()
+{
+ QFETCH(UnregisteredFlags, actualFlags);
+ QFETCH(UnregisteredFlags, expectedFlags);
+ QCOMPARE(actualFlags, expectedFlags);
+}
+
static bool boolfunc() { return true; }
static bool boolfunc2() { return true; }
diff --git a/tests/auto/testlib/selftests/expected_assert.tap b/tests/auto/testlib/selftests/expected_assert.tap
new file mode 100644
index 0000000000..4cd26848ac
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_assert.tap
@@ -0,0 +1,16 @@
+TAP version 13
+# tst_Assert
+ok 1 - initTestCase()
+ok 2 - testNumber1()
+# ASSERT: "false" in file qtbase/tests/auto/testlib/selftests/assert/tst_assert.cpp, line 0
+not ok 3 - testNumber2()
+ ---
+ # Received a fatal error.
+ at: tst_Assert::testNumber2() (Unknown file:0)
+ file: Unknown file
+ line: 0
+ ...
+1..3
+# tests 3
+# pass 2
+# fail 1
diff --git a/tests/auto/testlib/selftests/expected_badxml.tap b/tests/auto/testlib/selftests/expected_badxml.tap
new file mode 100644
index 0000000000..7aa4f11829
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_badxml.tap
@@ -0,0 +1,61 @@
+TAP version 13
+# tst_BadXml
+ok 1 - initTestCase()
+# a message
+not ok 2 - badDataTag(fail end cdata ]]> text ]]> more text)
+ ---
+ # a failure
+ at: tst_BadXml::badDataTag() (qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp:101)
+ file: qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp
+ line: 101
+ ...
+# a message
+ok 3 - badDataTag(pass end cdata ]]> text ]]> more text)
+# a message
+not ok 4 - badDataTag(fail quotes " text" more text)
+ ---
+ # a failure
+ at: tst_BadXml::badDataTag() (qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp:101)
+ file: qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp
+ line: 101
+ ...
+# a message
+ok 5 - badDataTag(pass quotes " text" more text)
+# a message
+not ok 6 - badDataTag(fail xml close > open < tags < text)
+ ---
+ # a failure
+ at: tst_BadXml::badDataTag() (qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp:101)
+ file: qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp
+ line: 101
+ ...
+# a message
+ok 7 - badDataTag(pass xml close > open < tags < text)
+# a message
+not ok 8 - badDataTag(fail all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs)
+ ---
+ # a failure
+ at: tst_BadXml::badDataTag() (qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp:101)
+ file: qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp
+ line: 101
+ ...
+# a message
+ok 9 - badDataTag(pass all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs)
+# end cdata ]]> text ]]> more text
+ok 10 - badMessage(string 0)
+# quotes " text" more text
+ok 11 - badMessage(string 1)
+# xml close > open < tags < text
+ok 12 - badMessage(string 2)
+# all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs
+ok 13 - badMessage(string 3)
+not ok 14 - failWithNoFile()
+ ---
+ # failure message
+ ...
+ok 15 - encoding() # SKIP Skipped for text due to unpredictable console encoding.
+ok 16 - cleanupTestCase()
+1..16
+# tests 16
+# pass 10
+# fail 5
diff --git a/tests/auto/testlib/selftests/expected_benchlibcounting.tap b/tests/auto/testlib/selftests/expected_benchlibcounting.tap
new file mode 100644
index 0000000000..e7a4280278
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_benchlibcounting.tap
@@ -0,0 +1,17 @@
+TAP version 13
+# tst_BenchlibCounting
+ok 1 - initTestCase()
+ok 2 - passingBenchmark()
+ok 3 - skippingBenchmark() # SKIP This is a skipping benchmark
+not ok 4 - failingBenchmark()
+ ---
+ # This is a failing benchmark
+ at: tst_BenchlibCounting::failingBenchmark() (qtbase/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp:58)
+ file: qtbase/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp
+ line: 58
+ ...
+ok 5 - cleanupTestCase()
+1..5
+# tests 5
+# pass 3
+# fail 1
diff --git a/tests/auto/testlib/selftests/expected_benchlibeventcounter.tap b/tests/auto/testlib/selftests/expected_benchlibeventcounter.tap
new file mode 100644
index 0000000000..02c65e59da
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_benchlibeventcounter.tap
@@ -0,0 +1,15 @@
+TAP version 13
+# tst_BenchlibEventCounter
+ok 1 - initTestCase()
+ok 2 - events(0)
+ok 3 - events(1)
+ok 4 - events(10)
+ok 5 - events(100)
+ok 6 - events(500)
+ok 7 - events(5000)
+ok 8 - events(100000)
+ok 9 - cleanupTestCase()
+1..9
+# tests 9
+# pass 9
+# fail 0
diff --git a/tests/auto/testlib/selftests/expected_benchlibtickcounter.tap b/tests/auto/testlib/selftests/expected_benchlibtickcounter.tap
new file mode 100644
index 0000000000..85d7f10ea0
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_benchlibtickcounter.tap
@@ -0,0 +1,9 @@
+TAP version 13
+# tst_BenchlibTickCounter
+ok 1 - initTestCase()
+ok 2 - threeBillionTicks()
+ok 3 - cleanupTestCase()
+1..3
+# tests 3
+# pass 3
+# fail 0
diff --git a/tests/auto/testlib/selftests/expected_benchlibwalltime.tap b/tests/auto/testlib/selftests/expected_benchlibwalltime.tap
new file mode 100644
index 0000000000..7653ccbeb3
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_benchlibwalltime.tap
@@ -0,0 +1,11 @@
+TAP version 13
+# tst_BenchlibWalltime
+ok 1 - initTestCase()
+ok 2 - waitForOneThousand()
+ok 3 - waitForFourThousand()
+ok 4 - qbenchmark_once()
+ok 5 - cleanupTestCase()
+1..5
+# tests 5
+# pass 5
+# fail 0
diff --git a/tests/auto/testlib/selftests/expected_cmptest.lightxml b/tests/auto/testlib/selftests/expected_cmptest.lightxml
index d47967a445..58b5a5e530 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.lightxml
+++ b/tests/auto/testlib/selftests/expected_cmptest.lightxml
@@ -29,6 +29,42 @@
</Incident>
<Duration msecs="0"/>
</TestFunction>
+<TestFunction name="test_windowflags">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[pass]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0">
+ <DataTag><![CDATA[fail1]]></DataTag>
+ <Description><![CDATA[Compared values are not the same
+ Actual (actualWindowFlags) : Window|WindowSystemMenuHint|WindowStaysOnBottomHint
+ Expected (expectedWindowFlags): Window|FramelessWindowHint|WindowSystemMenuHint|WindowStaysOnBottomHint]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0">
+ <DataTag><![CDATA[fail2]]></DataTag>
+ <Description><![CDATA[Compared values are not the same
+ Actual (actualWindowFlags) : Window
+ Expected (expectedWindowFlags): Window|FramelessWindowHint]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="test_unregistered_flags">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[pass]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0">
+ <DataTag><![CDATA[fail1]]></DataTag>
+ <Description><![CDATA[Compared values are not the same
+ Actual (actualFlags) : 0x3
+ Expected (expectedFlags): 0x5]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0">
+ <DataTag><![CDATA[fail2]]></DataTag>
+ <Description><![CDATA[Compared values are not the same
+ Actual (actualFlags) : 0x1
+ Expected (expectedFlags): 0x5]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
<TestFunction name="compare_boolfuncs">
<Incident type="pass" file="" line="0" />
<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_cmptest.tap b/tests/auto/testlib/selftests/expected_cmptest.tap
new file mode 100644
index 0000000000..238db2fc2b
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_cmptest.tap
@@ -0,0 +1,456 @@
+TAP version 13
+# tst_Cmptest
+ok 1 - initTestCase()
+not ok 2 - compare_unregistered_enums()
+ ---
+ # Compared values are not the same
+ at: tst_Cmptest::compare_unregistered_enums() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:171)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 171
+ ...
+not ok 3 - compare_registered_enums()
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: Sunday (Qt::Sunday)
+ found: Monday (Qt::Monday)
+ expected: Sunday (Qt::Sunday)
+ actual: Monday (Qt::Monday)
+ at: tst_Cmptest::compare_registered_enums() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:178)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 178
+ ...
+not ok 4 - compare_class_enums()
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: MyClassEnumValue2 (MyClassEnum::MyClassEnumValue2)
+ found: MyClassEnumValue1 (MyClassEnum::MyClassEnumValue1)
+ expected: MyClassEnumValue2 (MyClassEnum::MyClassEnumValue2)
+ actual: MyClassEnumValue1 (MyClassEnum::MyClassEnumValue1)
+ at: tst_Cmptest::compare_class_enums() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:184)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 184
+ ...
+ok 5 - test_windowflags(pass)
+not ok 6 - test_windowflags(fail1)
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: Window|FramelessWindowHint|WindowSystemMenuHint|WindowStaysOnBottomHint (expectedWindowFlags)
+ found: Window|WindowSystemMenuHint|WindowStaysOnBottomHint (actualWindowFlags)
+ expected: Window|FramelessWindowHint|WindowSystemMenuHint|WindowStaysOnBottomHint (expectedWindowFlags)
+ actual: Window|WindowSystemMenuHint|WindowStaysOnBottomHint (actualWindowFlags)
+ at: tst_Cmptest::test_windowflags() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:209)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 209
+ ...
+not ok 7 - test_windowflags(fail2)
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: Window|FramelessWindowHint (expectedWindowFlags)
+ found: Window (actualWindowFlags)
+ expected: Window|FramelessWindowHint (expectedWindowFlags)
+ actual: Window (actualWindowFlags)
+ at: tst_Cmptest::test_windowflags() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:209)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 209
+ ...
+ok 8 - test_unregistered_flags(pass)
+not ok 9 - test_unregistered_flags(fail1)
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: 0x5 (expectedFlags)
+ found: 0x3 (actualFlags)
+ expected: 0x5 (expectedFlags)
+ actual: 0x3 (actualFlags)
+ at: tst_Cmptest::test_unregistered_flags() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:242)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 242
+ ...
+not ok 10 - test_unregistered_flags(fail2)
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: 0x5 (expectedFlags)
+ found: 0x1 (actualFlags)
+ expected: 0x5 (expectedFlags)
+ actual: 0x1 (actualFlags)
+ at: tst_Cmptest::test_unregistered_flags() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:242)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 242
+ ...
+ok 11 - compare_boolfuncs()
+ok 12 - compare_to_nullptr()
+ok 13 - compare_pointerfuncs()
+not ok 14 - compare_tostring(int, string)
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: QVariant(QString,hi) (expected)
+ found: QVariant(int,123) (actual)
+ expected: QVariant(QString,hi) (expected)
+ actual: QVariant(int,123) (actual)
+ at: tst_Cmptest::compare_tostring() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:331)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 331
+ ...
+ok 15 - compare_tostring(both invalid)
+not ok 16 - compare_tostring(null hash, invalid)
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: QVariant() (expected)
+ found: QVariant(QVariantHash) (actual)
+ expected: QVariant() (expected)
+ actual: QVariant(QVariantHash) (actual)
+ at: tst_Cmptest::compare_tostring() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:331)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 331
+ ...
+not ok 17 - compare_tostring(string, null user type)
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: QVariant(PhonyClass) (expected)
+ found: QVariant(QString,A simple string) (actual)
+ expected: QVariant(PhonyClass) (expected)
+ actual: QVariant(QString,A simple string) (actual)
+ at: tst_Cmptest::compare_tostring() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:331)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 331
+ ...
+not ok 18 - compare_tostring(both non-null user type)
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: QVariant(PhonyClass,<value not representable as string>) (expected)
+ found: QVariant(PhonyClass,<value not representable as string>) (actual)
+ expected: QVariant(PhonyClass,<value not representable as string>) (expected)
+ actual: QVariant(PhonyClass,<value not representable as string>) (actual)
+ at: tst_Cmptest::compare_tostring() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:331)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 331
+ ...
+ok 19 - compareQStringLists(empty lists)
+ok 20 - compareQStringLists(equal lists)
+not ok 21 - compareQStringLists(last item different)
+ ---
+ type: QCOMPARE
+ message: Compared lists differ at index 2.
+ wanted: "DIFFERS" (opB)
+ found: "string3" (opA)
+ expected: "DIFFERS" (opB)
+ actual: "string3" (opA)
+ at: tst_Cmptest::compareQStringLists() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:425)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 425
+ ...
+not ok 22 - compareQStringLists(second-last item different)
+ ---
+ type: QCOMPARE
+ message: Compared lists differ at index 2.
+ wanted: "DIFFERS" (opB)
+ found: "string3" (opA)
+ expected: "DIFFERS" (opB)
+ actual: "string3" (opA)
+ at: tst_Cmptest::compareQStringLists() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:425)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 425
+ ...
+not ok 23 - compareQStringLists(prefix)
+ ---
+ # Compared lists have different sizes.
+ Actual (opA) size: 2
+ Expected (opB) size: 1
+ at: tst_Cmptest::compareQStringLists() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:425)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 425
+ ...
+not ok 24 - compareQStringLists(short list second)
+ ---
+ # Compared lists have different sizes.
+ Actual (opA) size: 12
+ Expected (opB) size: 1
+ at: tst_Cmptest::compareQStringLists() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:425)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 425
+ ...
+not ok 25 - compareQStringLists(short list first)
+ ---
+ # Compared lists have different sizes.
+ Actual (opA) size: 1
+ Expected (opB) size: 12
+ at: tst_Cmptest::compareQStringLists() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:425)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 425
+ ...
+not ok 26 - compareQListInt()
+ ---
+ type: QCOMPARE
+ message: Compared lists differ at index 2.
+ wanted: 4 (int2)
+ found: 3 (int1)
+ expected: 4 (int2)
+ actual: 3 (int1)
+ at: tst_Cmptest::compareQListInt() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:432)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 432
+ ...
+not ok 27 - compareQListDouble()
+ ---
+ type: QCOMPARE
+ message: Compared lists differ at index 0.
+ wanted: 1 (double2)
+ found: 1.5 (double1)
+ expected: 1 (double2)
+ actual: 1.5 (double1)
+ at: tst_Cmptest::compareQListDouble() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:439)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 439
+ ...
+ok 28 - compareQColor(Qt::yellow vs "yellow")
+not ok 29 - compareQColor(Qt::yellow vs Qt::green)
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: #ff00ff00 (colorB)
+ found: #ffffff00 (colorA)
+ expected: #ff00ff00 (colorB)
+ actual: #ffffff00 (colorA)
+ at: tst_Cmptest::compareQColor() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:458)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 458
+ ...
+not ok 30 - compareQColor(0x88ff0000 vs 0xffff0000)
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: #ffff0000 (colorB)
+ found: #88ff0000 (colorA)
+ expected: #ffff0000 (colorB)
+ actual: #88ff0000 (colorA)
+ at: tst_Cmptest::compareQColor() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:458)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 458
+ ...
+ok 31 - compareQPixmaps(both null)
+not ok 32 - compareQPixmaps(one null)
+ ---
+ type: QCOMPARE
+ message: Compared QPixmaps differ.
+ wanted: 0 (opB).isNull()
+ found: 1 (opA).isNull()
+ expected: 0 (opB).isNull()
+ actual: 1 (opA).isNull()
+ at: tst_Cmptest::compareQPixmaps() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:483)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 483
+ ...
+not ok 33 - compareQPixmaps(other null)
+ ---
+ type: QCOMPARE
+ message: Compared QPixmaps differ.
+ wanted: 1 (opB).isNull()
+ found: 0 (opA).isNull()
+ expected: 1 (opB).isNull()
+ actual: 0 (opA).isNull()
+ at: tst_Cmptest::compareQPixmaps() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:483)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 483
+ ...
+ok 34 - compareQPixmaps(equal)
+not ok 35 - compareQPixmaps(different size)
+ ---
+ type: QCOMPARE
+ message: Compared QPixmaps differ in size.
+ wanted: 20x20 (opB)
+ found: 11x20 (opA)
+ expected: 20x20 (opB)
+ actual: 11x20 (opA)
+ at: tst_Cmptest::compareQPixmaps() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:483)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 483
+ ...
+not ok 36 - compareQPixmaps(different pixels)
+ ---
+ # Compared values are not the same
+ at: tst_Cmptest::compareQPixmaps() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:483)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 483
+ ...
+ok 37 - compareQImages(both null)
+not ok 38 - compareQImages(one null)
+ ---
+ type: QCOMPARE
+ message: Compared QImages differ.
+ wanted: 0 (opB).isNull()
+ found: 1 (opA).isNull()
+ expected: 0 (opB).isNull()
+ actual: 1 (opA).isNull()
+ at: tst_Cmptest::compareQImages() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:510)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 510
+ ...
+not ok 39 - compareQImages(other null)
+ ---
+ type: QCOMPARE
+ message: Compared QImages differ.
+ wanted: 1 (opB).isNull()
+ found: 0 (opA).isNull()
+ expected: 1 (opB).isNull()
+ actual: 0 (opA).isNull()
+ at: tst_Cmptest::compareQImages() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:510)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 510
+ ...
+ok 40 - compareQImages(equal)
+not ok 41 - compareQImages(different size)
+ ---
+ type: QCOMPARE
+ message: Compared QImages differ in size.
+ wanted: 20x20 (opB)
+ found: 11x20 (opA)
+ expected: 20x20 (opB)
+ actual: 11x20 (opA)
+ at: tst_Cmptest::compareQImages() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:510)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 510
+ ...
+not ok 42 - compareQImages(different format)
+ ---
+ type: QCOMPARE
+ message: Compared QImages differ in format.
+ wanted: 3 (opB)
+ found: 6 (opA)
+ expected: 3 (opB)
+ actual: 6 (opA)
+ at: tst_Cmptest::compareQImages() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:510)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 510
+ ...
+not ok 43 - compareQImages(different pixels)
+ ---
+ # Compared values are not the same
+ at: tst_Cmptest::compareQImages() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:510)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 510
+ ...
+ok 44 - compareQRegion(equal-empty)
+not ok 45 - compareQRegion(1-empty)
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: QRegion(null) (rB)
+ found: QRegion(200x50+10+10) (rA)
+ expected: QRegion(null) (rB)
+ actual: QRegion(200x50+10+10) (rA)
+ at: tst_Cmptest::compareQRegion() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:533)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 533
+ ...
+ok 46 - compareQRegion(equal)
+not ok 47 - compareQRegion(different lists)
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: QRegion(2 rectangles, 50x200+100+200, 200x50+10+10) (rB)
+ found: QRegion(200x50+10+10) (rA)
+ expected: QRegion(2 rectangles, 50x200+100+200, 200x50+10+10) (rB)
+ actual: QRegion(200x50+10+10) (rA)
+ at: tst_Cmptest::compareQRegion() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:533)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 533
+ ...
+not ok 48 - compareQVector2D()
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: QVector2D(1, 3) (v2b)
+ found: QVector2D(1, 2) (v2a)
+ expected: QVector2D(1, 3) (v2b)
+ actual: QVector2D(1, 2) (v2a)
+ at: tst_Cmptest::compareQVector2D() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:542)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 542
+ ...
+not ok 49 - compareQVector3D()
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: QVector3D(1, 3, 3) (v3b)
+ found: QVector3D(1, 2, 3) (v3a)
+ expected: QVector3D(1, 3, 3) (v3b)
+ actual: QVector3D(1, 2, 3) (v3a)
+ at: tst_Cmptest::compareQVector3D() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:551)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 551
+ ...
+not ok 50 - compareQVector4D()
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: QVector4D(1, 3, 3, 4) (v4b)
+ found: QVector4D(1, 2, 3, 4) (v4a)
+ expected: QVector4D(1, 3, 3, 4) (v4b)
+ actual: QVector4D(1, 2, 3, 4) (v4a)
+ at: tst_Cmptest::compareQVector4D() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:560)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 560
+ ...
+not ok 51 - verify()
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (opaqueFunc() < 2)
+ found: false (opaqueFunc() < 2)
+ expected: true (opaqueFunc() < 2)
+ actual: false (opaqueFunc() < 2)
+ at: tst_Cmptest::verify() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:572)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 572
+ ...
+not ok 52 - verify2()
+ ---
+ type: QVERIFY
+ message: 42
+ wanted: true (opaqueFunc() < 2)
+ found: false (opaqueFunc() < 2)
+ expected: true (opaqueFunc() < 2)
+ actual: false (opaqueFunc() < 2)
+ at: tst_Cmptest::verify2() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:578)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 578
+ ...
+not ok 53 - tryVerify()
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (opaqueFunc() < 2)
+ found: false (opaqueFunc() < 2)
+ expected: true (opaqueFunc() < 2)
+ actual: false (opaqueFunc() < 2)
+ at: tst_Cmptest::tryVerify() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:584)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 584
+ ...
+not ok 54 - tryVerify2()
+ ---
+ type: QVERIFY
+ message: 42
+ wanted: true (opaqueFunc() < 2)
+ found: false (opaqueFunc() < 2)
+ expected: true (opaqueFunc() < 2)
+ actual: false (opaqueFunc() < 2)
+ at: tst_Cmptest::tryVerify2() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:590)
+ file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+ line: 590
+ ...
+ok 55 - verifyExplicitOperatorBool()
+ok 56 - cleanupTestCase()
+1..56
+# tests 56
+# pass 18
+# fail 38
diff --git a/tests/auto/testlib/selftests/expected_cmptest.teamcity b/tests/auto/testlib/selftests/expected_cmptest.teamcity
index a0dc509279..422d0cbfdf 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.teamcity
+++ b/tests/auto/testlib/selftests/expected_cmptest.teamcity
@@ -10,6 +10,22 @@
##teamcity[testStarted name='compare_class_enums()' flowId='tst_Cmptest']
##teamcity[testFailed name='compare_class_enums()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual (MyClassEnum::MyClassEnumValue1): MyClassEnumValue1|n Expected (MyClassEnum::MyClassEnumValue2): MyClassEnumValue2' flowId='tst_Cmptest']
##teamcity[testFinished name='compare_class_enums()' flowId='tst_Cmptest']
+##teamcity[testStarted name='test_windowflags(pass)' flowId='tst_Cmptest']
+##teamcity[testFinished name='test_windowflags(pass)' flowId='tst_Cmptest']
+##teamcity[testStarted name='test_windowflags(fail1)' flowId='tst_Cmptest']
+##teamcity[testFailed name='test_windowflags(fail1)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual (actualWindowFlags) : Window||WindowSystemMenuHint||WindowStaysOnBottomHint|n Expected (expectedWindowFlags): Window||FramelessWindowHint||WindowSystemMenuHint||WindowStaysOnBottomHint' flowId='tst_Cmptest']
+##teamcity[testFinished name='test_windowflags(fail1)' flowId='tst_Cmptest']
+##teamcity[testStarted name='test_windowflags(fail2)' flowId='tst_Cmptest']
+##teamcity[testFailed name='test_windowflags(fail2)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual (actualWindowFlags) : Window|n Expected (expectedWindowFlags): Window||FramelessWindowHint' flowId='tst_Cmptest']
+##teamcity[testFinished name='test_windowflags(fail2)' flowId='tst_Cmptest']
+##teamcity[testStarted name='test_unregistered_flags(pass)' flowId='tst_Cmptest']
+##teamcity[testFinished name='test_unregistered_flags(pass)' flowId='tst_Cmptest']
+##teamcity[testStarted name='test_unregistered_flags(fail1)' flowId='tst_Cmptest']
+##teamcity[testFailed name='test_unregistered_flags(fail1)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual (actualFlags) : 0x3|n Expected (expectedFlags): 0x5' flowId='tst_Cmptest']
+##teamcity[testFinished name='test_unregistered_flags(fail1)' flowId='tst_Cmptest']
+##teamcity[testStarted name='test_unregistered_flags(fail2)' flowId='tst_Cmptest']
+##teamcity[testFailed name='test_unregistered_flags(fail2)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual (actualFlags) : 0x1|n Expected (expectedFlags): 0x5' flowId='tst_Cmptest']
+##teamcity[testFinished name='test_unregistered_flags(fail2)' flowId='tst_Cmptest']
##teamcity[testStarted name='compare_boolfuncs()' flowId='tst_Cmptest']
##teamcity[testFinished name='compare_boolfuncs()' flowId='tst_Cmptest']
##teamcity[testStarted name='compare_to_nullptr()' flowId='tst_Cmptest']
diff --git a/tests/auto/testlib/selftests/expected_cmptest.txt b/tests/auto/testlib/selftests/expected_cmptest.txt
index 78df990dea..e1aa81c1a1 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.txt
+++ b/tests/auto/testlib/selftests/expected_cmptest.txt
@@ -11,6 +11,24 @@ FAIL! : tst_Cmptest::compare_class_enums() Compared values are not the same
Actual (MyClassEnum::MyClassEnumValue1): MyClassEnumValue1
Expected (MyClassEnum::MyClassEnumValue2): MyClassEnumValue2
Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)]
+PASS : tst_Cmptest::test_windowflags(pass)
+FAIL! : tst_Cmptest::test_windowflags(fail1) Compared values are not the same
+ Actual (actualWindowFlags) : Window|WindowSystemMenuHint|WindowStaysOnBottomHint
+ Expected (expectedWindowFlags): Window|FramelessWindowHint|WindowSystemMenuHint|WindowStaysOnBottomHint
+ Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)]
+FAIL! : tst_Cmptest::test_windowflags(fail2) Compared values are not the same
+ Actual (actualWindowFlags) : Window
+ Expected (expectedWindowFlags): Window|FramelessWindowHint
+ Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)]
+PASS : tst_Cmptest::test_unregistered_flags(pass)
+FAIL! : tst_Cmptest::test_unregistered_flags(fail1) Compared values are not the same
+ Actual (actualFlags) : 0x3
+ Expected (expectedFlags): 0x5
+ Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)]
+FAIL! : tst_Cmptest::test_unregistered_flags(fail2) Compared values are not the same
+ Actual (actualFlags) : 0x1
+ Expected (expectedFlags): 0x5
+ Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)]
PASS : tst_Cmptest::compare_boolfuncs()
PASS : tst_Cmptest::compare_to_nullptr()
PASS : tst_Cmptest::compare_pointerfuncs()
@@ -138,5 +156,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: 16 passed, 34 failed, 0 skipped, 0 blacklisted, 0ms
+Totals: 18 passed, 38 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 01b725f247..1c5a17631a 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.xml
+++ b/tests/auto/testlib/selftests/expected_cmptest.xml
@@ -31,6 +31,42 @@
</Incident>
<Duration msecs="0"/>
</TestFunction>
+<TestFunction name="test_windowflags">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[pass]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0">
+ <DataTag><![CDATA[fail1]]></DataTag>
+ <Description><![CDATA[Compared values are not the same
+ Actual (actualWindowFlags) : Window|WindowSystemMenuHint|WindowStaysOnBottomHint
+ Expected (expectedWindowFlags): Window|FramelessWindowHint|WindowSystemMenuHint|WindowStaysOnBottomHint]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0">
+ <DataTag><![CDATA[fail2]]></DataTag>
+ <Description><![CDATA[Compared values are not the same
+ Actual (actualWindowFlags) : Window
+ Expected (expectedWindowFlags): Window|FramelessWindowHint]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="test_unregistered_flags">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[pass]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0">
+ <DataTag><![CDATA[fail1]]></DataTag>
+ <Description><![CDATA[Compared values are not the same
+ Actual (actualFlags) : 0x3
+ Expected (expectedFlags): 0x5]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0">
+ <DataTag><![CDATA[fail2]]></DataTag>
+ <Description><![CDATA[Compared values are not the same
+ Actual (actualFlags) : 0x1
+ Expected (expectedFlags): 0x5]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
<TestFunction name="compare_boolfuncs">
<Incident type="pass" file="" line="0" />
<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_cmptest.xunitxml b/tests/auto/testlib/selftests/expected_cmptest.xunitxml
index 812696ffcf..99823d1c1c 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="34" tests="24" name="tst_Cmptest">
+<testsuite errors="0" failures="38" tests="26" name="tst_Cmptest">
<properties>
<property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
<property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
@@ -19,6 +19,22 @@
Actual (MyClassEnum::MyClassEnumValue1): MyClassEnumValue1
Expected (MyClassEnum::MyClassEnumValue2): MyClassEnumValue2" result="fail"/>
</testcase>
+ <testcase result="fail" name="test_windowflags">
+ <failure tag="fail1" message="Compared values are not the same
+ Actual (actualWindowFlags) : Window|WindowSystemMenuHint|WindowStaysOnBottomHint
+ Expected (expectedWindowFlags): Window|FramelessWindowHint|WindowSystemMenuHint|WindowStaysOnBottomHint" result="fail"/>
+ <failure tag="fail2" message="Compared values are not the same
+ Actual (actualWindowFlags) : Window
+ Expected (expectedWindowFlags): Window|FramelessWindowHint" result="fail"/>
+ </testcase>
+ <testcase result="fail" name="test_unregistered_flags">
+ <failure tag="fail1" message="Compared values are not the same
+ Actual (actualFlags) : 0x3
+ Expected (expectedFlags): 0x5" result="fail"/>
+ <failure tag="fail2" message="Compared values are not the same
+ Actual (actualFlags) : 0x1
+ Expected (expectedFlags): 0x5" result="fail"/>
+ </testcase>
<testcase result="pass" name="compare_boolfuncs"/>
<testcase result="pass" name="compare_to_nullptr"/>
<testcase result="pass" name="compare_pointerfuncs"/>
diff --git a/tests/auto/testlib/selftests/expected_commandlinedata.tap b/tests/auto/testlib/selftests/expected_commandlinedata.tap
new file mode 100644
index 0000000000..1e1abfba50
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_commandlinedata.tap
@@ -0,0 +1,20 @@
+TAP version 13
+# tst_DataTable
+ok 1 - initTestCase()
+# QVERIFY(test)
+ok 2 - fiveTablePasses(fiveTablePasses_data1)
+# QVERIFY(test)
+ok 3 - fiveTablePasses(fiveTablePasses_data2)
+# QVERIFY(test)
+ok 4 - fiveTablePasses(fiveTablePasses_data3)
+# QVERIFY(test)
+ok 5 - fiveTablePasses(fiveTablePasses_data4)
+# QVERIFY(test)
+ok 6 - fiveTablePasses(fiveTablePasses_data5)
+# QVERIFY(test)
+ok 7 - fiveTablePasses(fiveTablePasses_data1)
+ok 8 - cleanupTestCase()
+1..8
+# tests 8
+# pass 8
+# fail 0
diff --git a/tests/auto/testlib/selftests/expected_counting.tap b/tests/auto/testlib/selftests/expected_counting.tap
new file mode 100644
index 0000000000..ad53e8f14e
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_counting.tap
@@ -0,0 +1,118 @@
+TAP version 13
+# tst_Counting
+ok 1 - initTestCase()
+ok 2 - testPassPass(row 1)
+ok 3 - testPassPass(row 2)
+ok 4 - testPassSkip(row 1)
+ok 5 - testPassSkip(row 2) # SKIP Skipping
+ok 6 - testPassFail(row 1)
+not ok 7 - testPassFail(row 2)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testPassFail() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+ok 8 - testSkipPass(row 1) # SKIP Skipping
+ok 9 - testSkipPass(row 2)
+ok 10 - testSkipSkip(row 1) # SKIP Skipping
+ok 11 - testSkipSkip(row 2) # SKIP Skipping
+ok 12 - testSkipFail(row 1) # SKIP Skipping
+not ok 13 - testSkipFail(row 2)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testSkipFail() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+not ok 14 - testFailPass(row 1)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testFailPass() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+ok 15 - testFailPass(row 2)
+not ok 16 - testFailSkip(row 1)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testFailSkip() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+ok 17 - testFailSkip(row 2) # SKIP Skipping
+not ok 18 - testFailFail(row 1)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testFailFail() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+not ok 19 - testFailFail(row 2)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testFailFail() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+ok 20 - testFailInInit(before)
+not ok 21 - testFailInInit(fail)
+ ---
+ # Fail in init()
+ at: tst_Counting::testFailInInit() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:221)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 221
+ ...
+ok 22 - testFailInInit(after)
+ok 23 - testFailInCleanup(before)
+# This test function should execute and then QFAIL in cleanup()
+not ok 24 - testFailInCleanup(fail)
+ ---
+ # Fail in cleanup()
+ at: tst_Counting::testFailInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:229)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 229
+ ...
+ok 25 - testFailInCleanup(after)
+ok 26 - testSkipInInit(before)
+ok 27 - testSkipInInit(skip) # SKIP Skip in init()
+ok 28 - testSkipInInit(after)
+ok 29 - testSkipInCleanup(before)
+# This test function should execute and then QSKIP in cleanup()
+ok 30 - testSkipInCleanup(skip) # SKIP Skip in cleanup()
+ok 31 - testSkipInCleanup(after)
+ok 32 - cleanupTestCase()
+1..32
+# tests 32
+# pass 16
+# fail 8
diff --git a/tests/auto/testlib/selftests/expected_crashes_4.txt b/tests/auto/testlib/selftests/expected_crashes_4.txt
new file mode 100644
index 0000000000..e0e4d27b0a
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_crashes_4.txt
@@ -0,0 +1,7 @@
+********* Start testing of tst_Crashes *********
+Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@
+PASS : tst_Crashes::initTestCase()
+QFATAL : tst_Crashes::crash() Received signal 11
+ Function time: ms Total time: ms
+FAIL! : tst_Crashes::crash() Received a fatal error.
+ Loc: [Unknown file(0)]
diff --git a/tests/auto/testlib/selftests/expected_datatable.tap b/tests/auto/testlib/selftests/expected_datatable.tap
new file mode 100644
index 0000000000..8a3d473b6c
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_datatable.tap
@@ -0,0 +1,183 @@
+TAP version 13
+# tst_DataTable
+ok 1 - initTestCase()
+ok 2 - singleTestFunction1()
+ok 3 - singleTestFunction2()
+ok 4 - fiveTablePasses(fiveTablePasses_data 1)
+ok 5 - fiveTablePasses(fiveTablePasses_data 2)
+ok 6 - fiveTablePasses(fiveTablePasses_data 3)
+ok 7 - fiveTablePasses(fiveTablePasses_data 4)
+ok 8 - fiveTablePasses(fiveTablePasses_data 5)
+not ok 9 - fiveTableFailures(fiveTableFailures_data 1)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (test)
+ found: false (test)
+ expected: true (test)
+ actual: false (test)
+ at: tst_DataTable::fiveTableFailures() (qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp:78)
+ file: qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
+ line: 78
+ ...
+not ok 10 - fiveTableFailures(fiveTableFailures_data 2)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (test)
+ found: false (test)
+ expected: true (test)
+ actual: false (test)
+ at: tst_DataTable::fiveTableFailures() (qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp:78)
+ file: qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
+ line: 78
+ ...
+not ok 11 - fiveTableFailures(fiveTableFailures_data 3)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (test)
+ found: false (test)
+ expected: true (test)
+ actual: false (test)
+ at: tst_DataTable::fiveTableFailures() (qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp:78)
+ file: qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
+ line: 78
+ ...
+not ok 12 - fiveTableFailures(fiveTableFailures_data 4)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (test)
+ found: false (test)
+ expected: true (test)
+ actual: false (test)
+ at: tst_DataTable::fiveTableFailures() (qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp:78)
+ file: qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
+ line: 78
+ ...
+not ok 13 - fiveTableFailures(fiveTableFailures_data 5)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (test)
+ found: false (test)
+ expected: true (test)
+ actual: false (test)
+ at: tst_DataTable::fiveTableFailures() (qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp:78)
+ file: qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
+ line: 78
+ ...
+not ok 14 - startsWithFailure(startsWithFailure_data 1)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (test)
+ found: false (test)
+ expected: true (test)
+ actual: false (test)
+ at: tst_DataTable::startsWithFailure() (qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp:78)
+ file: qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
+ line: 78
+ ...
+ok 15 - startsWithFailure(startsWithFailure_data 2)
+ok 16 - startsWithFailure(startsWithFailure_data 3)
+ok 17 - startsWithFailure(startsWithFailure_data 4)
+ok 18 - startsWithFailure(startsWithFailure_data 5)
+ok 19 - endsWithFailure(endsWithFailure 1)
+ok 20 - endsWithFailure(endsWithFailure 2)
+ok 21 - endsWithFailure(endsWithFailure 3)
+ok 22 - endsWithFailure(endsWithFailure 4)
+not ok 23 - endsWithFailure(endsWithFailure 5)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (test)
+ found: false (test)
+ expected: true (test)
+ actual: false (test)
+ at: tst_DataTable::endsWithFailure() (qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp:78)
+ file: qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
+ line: 78
+ ...
+ok 24 - failureInMiddle(failureInMiddle_data 1)
+ok 25 - failureInMiddle(failureInMiddle_data 2)
+not ok 26 - failureInMiddle(failureInMiddle_data 3)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (test)
+ found: false (test)
+ expected: true (test)
+ actual: false (test)
+ at: tst_DataTable::failureInMiddle() (qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp:78)
+ file: qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
+ line: 78
+ ...
+ok 27 - failureInMiddle(failureInMiddle_data 4)
+ok 28 - failureInMiddle(failureInMiddle_data 5)
+not ok 29 - fiveIsolatedFailures(fiveIsolatedFailures_data 1)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (!test)
+ found: false (!test)
+ expected: true (!test)
+ actual: false (!test)
+ at: tst_DataTable::fiveIsolatedFailures() (qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp:160)
+ file: qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
+ line: 160
+ ...
+not ok 30 - fiveIsolatedFailures(fiveIsolatedFailures_data 2)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (!test)
+ found: false (!test)
+ expected: true (!test)
+ actual: false (!test)
+ at: tst_DataTable::fiveIsolatedFailures() (qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp:160)
+ file: qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
+ line: 160
+ ...
+not ok 31 - fiveIsolatedFailures(fiveIsolatedFailures_data 3)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (!test)
+ found: false (!test)
+ expected: true (!test)
+ actual: false (!test)
+ at: tst_DataTable::fiveIsolatedFailures() (qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp:160)
+ file: qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
+ line: 160
+ ...
+not ok 32 - fiveIsolatedFailures(fiveIsolatedFailures_data 4)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (!test)
+ found: false (!test)
+ expected: true (!test)
+ actual: false (!test)
+ at: tst_DataTable::fiveIsolatedFailures() (qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp:160)
+ file: qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
+ line: 160
+ ...
+not ok 33 - fiveIsolatedFailures(fiveIsolatedFailures_data 5)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (!test)
+ found: false (!test)
+ expected: true (!test)
+ actual: false (!test)
+ at: tst_DataTable::fiveIsolatedFailures() (qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp:160)
+ file: qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
+ line: 160
+ ...
+ok 34 - cleanupTestCase()
+1..34
+# tests 34
+# pass 21
+# fail 13
diff --git a/tests/auto/testlib/selftests/expected_datetime.tap b/tests/auto/testlib/selftests/expected_datetime.tap
new file mode 100644
index 0000000000..896aeafa37
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_datetime.tap
@@ -0,0 +1,46 @@
+TAP version 13
+# tst_DateTime
+ok 1 - initTestCase()
+not ok 2 - dateTime()
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: 2000/05/03 04:03:04.000[UTC] (utc)
+ found: 2000/05/03 04:03:04.000[UTC+00:02] (local)
+ expected: 2000/05/03 04:03:04.000[UTC] (utc)
+ actual: 2000/05/03 04:03:04.000[UTC+00:02] (local)
+ at: tst_DateTime::dateTime() (qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp:52)
+ file: qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp
+ line: 52
+ ...
+ok 3 - qurl(empty urls)
+not ok 4 - qurl(empty rhs)
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: Invalid URL: (operandB)
+ found: http://example.com (operandA)
+ expected: Invalid URL: (operandB)
+ actual: http://example.com (operandA)
+ at: tst_DateTime::qurl() (qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp:60)
+ file: qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp
+ line: 60
+ ...
+not ok 5 - qurl(empty lhs)
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: http://example.com (operandB)
+ found: Invalid URL: (operandA)
+ expected: http://example.com (operandB)
+ actual: Invalid URL: (operandA)
+ at: tst_DateTime::qurl() (qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp:60)
+ file: qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp
+ line: 60
+ ...
+ok 6 - qurl(same urls)
+ok 7 - cleanupTestCase()
+1..7
+# tests 7
+# pass 4
+# fail 3
diff --git a/tests/auto/testlib/selftests/expected_exceptionthrow.tap b/tests/auto/testlib/selftests/expected_exceptionthrow.tap
new file mode 100644
index 0000000000..d8dbf173d6
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_exceptionthrow.tap
@@ -0,0 +1,14 @@
+TAP version 13
+# tst_Exception
+ok 1 - initTestCase()
+not ok 2 - throwException()
+ ---
+ # Caught unhandled exception
+ at: tst_Exception::throwException() (qtbase/src/testlib/qtestcase.cpp:1846)
+ file: qtbase/src/testlib/qtestcase.cpp
+ line: 1846
+ ...
+1..2
+# tests 2
+# pass 1
+# fail 1
diff --git a/tests/auto/testlib/selftests/expected_expectfail.tap b/tests/auto/testlib/selftests/expected_expectfail.tap
new file mode 100644
index 0000000000..0e5dc4d982
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_expectfail.tap
@@ -0,0 +1,96 @@
+TAP version 13
+# tst_ExpectFail
+ok 1 - initTestCase()
+# begin
+not ok 2 - xfailAndContinue() # TODO This should xfail
+ ---
+ at: tst_ExpectFail::xfailAndContinue() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:65)
+ file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp
+ line: 65
+ ...
+# after
+# begin
+not ok 3 - xfailAndAbort() # TODO This should xfail
+ ---
+ at: tst_ExpectFail::xfailAndAbort() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:73)
+ file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp
+ line: 73
+ ...
+not ok 4 - xfailTwice()
+ ---
+ # Already expecting a fail
+ at: tst_ExpectFail::xfailTwice() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:83)
+ file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp
+ line: 83
+ ...
+not ok 5 - xfailWithQString() # TODO A string
+ ---
+ at: tst_ExpectFail::xfailWithQString() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:92)
+ file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp
+ line: 92
+ ...
+not ok 5 - xfailWithQString() # TODO Bug 5 (The message)
+ ---
+ at: tst_ExpectFail::xfailWithQString() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:97)
+ file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp
+ line: 97
+ ...
+ok 6 - xfailDataDrivenWithQVerify(Pass 1)
+ok 7 - xfailDataDrivenWithQVerify(Pass 2)
+not ok 8 - xfailDataDrivenWithQVerify(Abort) # TODO This test should xfail
+ ---
+ at: tst_ExpectFail::xfailDataDrivenWithQVerify() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:126)
+ file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp
+ line: 126
+ ...
+not ok 9 - xfailDataDrivenWithQVerify(Continue) # TODO This test should xfail
+ ---
+ at: tst_ExpectFail::xfailDataDrivenWithQVerify() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:126)
+ file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp
+ line: 126
+ ...
+ok 10 - xfailDataDrivenWithQCompare(Pass 1)
+ok 11 - xfailDataDrivenWithQCompare(Pass 2)
+not ok 12 - xfailDataDrivenWithQCompare(Abort) # TODO This test should xfail
+ ---
+ at: tst_ExpectFail::xfailDataDrivenWithQCompare() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:160)
+ file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp
+ line: 160
+ ...
+not ok 13 - xfailDataDrivenWithQCompare(Continue) # TODO This test should xfail
+ ---
+ at: tst_ExpectFail::xfailDataDrivenWithQCompare() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:160)
+ file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp
+ line: 160
+ ...
+ok 14 - xfailOnWrongRow(right row)
+not ok 15 - xfailOnAnyRow(first row) # TODO This test should xfail
+ ---
+ at: tst_ExpectFail::xfailOnAnyRow() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:195)
+ file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp
+ line: 195
+ ...
+not ok 16 - xfailOnAnyRow(second row) # TODO This test should xfail
+ ---
+ at: tst_ExpectFail::xfailOnAnyRow() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:195)
+ file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp
+ line: 195
+ ...
+not ok 17 - xfailWithoutVerify(first row)
+ ---
+ # QEXPECT_FAIL was called without any subsequent verification statements
+ ...
+not ok 18 - xfailWithoutVerify(second row)
+ ---
+ # QEXPECT_FAIL was called without any subsequent verification statements
+ ...
+ok 19 - xpass() # TODO 'true' returned TRUE unexpectedly. ()
+ok 20 - xpassDataDrivenWithQVerify(XPass) # TODO 'true' returned TRUE unexpectedly. ()
+ok 21 - xpassDataDrivenWithQVerify(Pass)
+ok 22 - xpassDataDrivenWithQCompare(XPass) # TODO QCOMPARE(1, 1) returned TRUE unexpectedly.
+ok 23 - xpassDataDrivenWithQCompare(Pass)
+ok 24 - cleanupTestCase()
+1..24
+# tests 24
+# pass 18
+# fail 6
diff --git a/tests/auto/testlib/selftests/expected_failcleanup.tap b/tests/auto/testlib/selftests/expected_failcleanup.tap
new file mode 100644
index 0000000000..2098cc1e17
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failcleanup.tap
@@ -0,0 +1,20 @@
+TAP version 13
+# tst_FailCleanup
+ok 1 - initTestCase()
+ok 2 - aTestFunction()
+not ok 3 - cleanupTestCase()
+ ---
+ type: QVERIFY
+ message: Fail inside cleanupTestCase
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_FailCleanup::cleanupTestCase() (qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp:46)
+ file: qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp
+ line: 46
+ ...
+1..3
+# tests 3
+# pass 2
+# fail 1
diff --git a/tests/auto/testlib/selftests/expected_failinit.tap b/tests/auto/testlib/selftests/expected_failinit.tap
new file mode 100644
index 0000000000..d99a71fd51
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failinit.tap
@@ -0,0 +1,19 @@
+TAP version 13
+# tst_FailInit
+not ok 1 - initTestCase()
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_FailInit::initTestCase() (qtbase/tests/auto/testlib/selftests/failinit/tst_failinit.cpp:42)
+ file: qtbase/tests/auto/testlib/selftests/failinit/tst_failinit.cpp
+ line: 42
+ ...
+ok 2 - cleanupTestCase()
+1..2
+# tests 2
+# pass 1
+# fail 1
diff --git a/tests/auto/testlib/selftests/expected_failinitdata.tap b/tests/auto/testlib/selftests/expected_failinitdata.tap
new file mode 100644
index 0000000000..27bdda5a13
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failinitdata.tap
@@ -0,0 +1,18 @@
+TAP version 13
+# tst_FailInitData
+not ok 1 - initTestCase()
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_FailInitData::initTestCase() (qtbase/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp:43)
+ file: qtbase/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp
+ line: 43
+ ...
+1..1
+# tests 1
+# pass 0
+# fail 1
diff --git a/tests/auto/testlib/selftests/expected_fetchbogus.tap b/tests/auto/testlib/selftests/expected_fetchbogus.tap
new file mode 100644
index 0000000000..c6761b2301
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_fetchbogus.tap
@@ -0,0 +1,15 @@
+TAP version 13
+# tst_FetchBogus
+ok 1 - initTestCase()
+# QFETCH: Requested testdata 'bubu' not available, check your _data function.
+not ok 2 - fetchBogus(foo)
+ ---
+ # Received a fatal error.
+ at: tst_FetchBogus::fetchBogus() (Unknown file:0)
+ file: Unknown file
+ line: 0
+ ...
+1..2
+# tests 2
+# pass 1
+# fail 1
diff --git a/tests/auto/testlib/selftests/expected_findtestdata.tap b/tests/auto/testlib/selftests/expected_findtestdata.tap
new file mode 100644
index 0000000000..0fb38d2822
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_findtestdata.tap
@@ -0,0 +1,10 @@
+TAP version 13
+# FindTestData
+ok 1 - initTestCase()
+# testdata testfile could not be located!
+ok 2 - paths()
+ok 3 - cleanupTestCase()
+1..3
+# tests 3
+# pass 3
+# fail 0
diff --git a/tests/auto/testlib/selftests/expected_float.tap b/tests/auto/testlib/selftests/expected_float.tap
new file mode 100644
index 0000000000..fae2dc9796
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_float.tap
@@ -0,0 +1,82 @@
+TAP version 13
+# tst_float
+ok 1 - initTestCase()
+ok 2 - floatComparisons(should SUCCEED 1)
+not ok 3 - floatComparisons(should FAIL 1)
+ ---
+ type: QCOMPARE
+ message: Compared floats are not the same (fuzzy compare)
+ wanted: 3 (operandRight)
+ found: 1 (operandLeft)
+ expected: 3 (operandRight)
+ actual: 1 (operandLeft)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:48)
+ file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
+ line: 48
+ ...
+not ok 4 - floatComparisons(should FAIL 2)
+ ---
+ type: QCOMPARE
+ message: Compared floats are not the same (fuzzy compare)
+ wanted: 3e-07 (operandRight)
+ found: 1e-07 (operandLeft)
+ expected: 3e-07 (operandRight)
+ actual: 1e-07 (operandLeft)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:48)
+ file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
+ line: 48
+ ...
+not ok 5 - floatComparisons(should FAIL 3)
+ ---
+ type: QCOMPARE
+ message: Compared floats are not the same (fuzzy compare)
+ wanted: 99999 (operandRight)
+ found: 99998 (operandLeft)
+ expected: 99999 (operandRight)
+ actual: 99998 (operandLeft)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:48)
+ file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
+ line: 48
+ ...
+ok 6 - floatComparisons(should SUCCEED 2)
+not ok 7 - compareFloatTests(1e0)
+ ---
+ type: QCOMPARE
+ message: Compared floats are not the same (fuzzy compare)
+ wanted: 3 (t3)
+ found: 1 (t1)
+ expected: 3 (t3)
+ actual: 1 (t1)
+ at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:96)
+ file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
+ line: 96
+ ...
+not ok 8 - compareFloatTests(1e-7)
+ ---
+ type: QCOMPARE
+ message: Compared floats are not the same (fuzzy compare)
+ wanted: 3e-07 (t3)
+ found: 1e-07 (t1)
+ expected: 3e-07 (t3)
+ actual: 1e-07 (t1)
+ at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:96)
+ file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
+ line: 96
+ ...
+not ok 9 - compareFloatTests(1e+7)
+ ---
+ type: QCOMPARE
+ message: Compared floats are not the same (fuzzy compare)
+ wanted: 3e+07 (t3)
+ found: 1e+07 (t1)
+ expected: 3e+07 (t3)
+ actual: 1e+07 (t1)
+ at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:96)
+ file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
+ line: 96
+ ...
+ok 10 - cleanupTestCase()
+1..10
+# tests 10
+# pass 4
+# fail 6
diff --git a/tests/auto/testlib/selftests/expected_globaldata.tap b/tests/auto/testlib/selftests/expected_globaldata.tap
new file mode 100644
index 0000000000..580cf3a7a8
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_globaldata.tap
@@ -0,0 +1,52 @@
+TAP version 13
+# tst_globaldata
+# initTestCase initTestCase (null)
+ok 1 - initTestCase()
+# init testGlobal local 1
+# global: false
+# local: false
+# cleanup testGlobal local 1
+ok 2 - testGlobal(1:local 1)
+# init testGlobal local 2
+# global: false
+# local: true
+# cleanup testGlobal local 2
+ok 3 - testGlobal(1:local 2)
+# init testGlobal local 1
+# global: true
+# local: false
+# cleanup testGlobal local 1
+ok 4 - testGlobal(2:local 1)
+# init testGlobal local 2
+# global: true
+# local: true
+# cleanup testGlobal local 2
+ok 5 - testGlobal(2:local 2)
+ok 6 - skip(1) # SKIP skipping
+# init skipLocal local 1
+ok 7 - skipLocal(1:local 1) # SKIP skipping
+# cleanup skipLocal local 1
+# init skipLocal local 2
+ok 8 - skipLocal(1:local 2) # SKIP skipping
+# cleanup skipLocal local 2
+# init skipSingle local 1
+# global: false local: false
+# cleanup skipSingle local 1
+ok 9 - skipSingle(1:local 1)
+# init skipSingle local 2
+# global: false local: true
+# cleanup skipSingle local 2
+ok 10 - skipSingle(1:local 2)
+# init skipSingle local 1
+ok 11 - skipSingle(2:local 1) # SKIP skipping
+# cleanup skipSingle local 1
+# init skipSingle local 2
+# global: true local: true
+# cleanup skipSingle local 2
+ok 12 - skipSingle(2:local 2)
+# cleanupTestCase cleanupTestCase (null)
+ok 13 - cleanupTestCase()
+1..13
+# tests 13
+# pass 9
+# fail 0
diff --git a/tests/auto/testlib/selftests/expected_keyboard.lightxml b/tests/auto/testlib/selftests/expected_keyboard.lightxml
new file mode 100644
index 0000000000..5699fba3bf
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_keyboard.lightxml
@@ -0,0 +1,18 @@
+<Environment>
+ <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
+ <QtBuild/>
+ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
+</Environment>
+<TestFunction name="initTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="keyPressAndRelease">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="cleanupTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_keyboard.tap b/tests/auto/testlib/selftests/expected_keyboard.tap
new file mode 100644
index 0000000000..0725434f8c
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_keyboard.tap
@@ -0,0 +1,9 @@
+TAP version 13
+# tst_Keyboard
+ok 1 - initTestCase()
+ok 2 - keyPressAndRelease()
+ok 3 - cleanupTestCase()
+1..3
+# tests 3
+# pass 3
+# fail 0
diff --git a/tests/auto/testlib/selftests/expected_keyboard.teamcity b/tests/auto/testlib/selftests/expected_keyboard.teamcity
new file mode 100644
index 0000000000..dc01f86ff0
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_keyboard.teamcity
@@ -0,0 +1,8 @@
+##teamcity[testSuiteStarted name='tst_Keyboard' flowId='tst_Keyboard']
+##teamcity[testStarted name='initTestCase()' flowId='tst_Keyboard']
+##teamcity[testFinished name='initTestCase()' flowId='tst_Keyboard']
+##teamcity[testStarted name='keyPressAndRelease()' flowId='tst_Keyboard']
+##teamcity[testFinished name='keyPressAndRelease()' flowId='tst_Keyboard']
+##teamcity[testStarted name='cleanupTestCase()' flowId='tst_Keyboard']
+##teamcity[testFinished name='cleanupTestCase()' flowId='tst_Keyboard']
+##teamcity[testSuiteFinished name='tst_Keyboard' flowId='tst_Keyboard']
diff --git a/tests/auto/testlib/selftests/expected_keyboard.txt b/tests/auto/testlib/selftests/expected_keyboard.txt
new file mode 100644
index 0000000000..13b7c70672
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_keyboard.txt
@@ -0,0 +1,7 @@
+********* Start testing of tst_Keyboard *********
+Config: Using QtTest library
+PASS : tst_Keyboard::initTestCase()
+PASS : tst_Keyboard::keyPressAndRelease()
+PASS : tst_Keyboard::cleanupTestCase()
+Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 0ms
+********* Finished testing of tst_Keyboard *********
diff --git a/tests/auto/testlib/selftests/expected_keyboard.xml b/tests/auto/testlib/selftests/expected_keyboard.xml
new file mode 100644
index 0000000000..f5ad1b2287
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_keyboard.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestCase name="tst_Keyboard">
+<Environment>
+ <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
+ <QtBuild/>
+ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
+</Environment>
+<TestFunction name="initTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="keyPressAndRelease">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="cleanupTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
+</TestCase>
diff --git a/tests/auto/testlib/selftests/expected_keyboard.xunitxml b/tests/auto/testlib/selftests/expected_keyboard.xunitxml
new file mode 100644
index 0000000000..93b5f7bfff
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_keyboard.xunitxml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite errors="0" failures="0" tests="3" name="tst_Keyboard">
+ <properties>
+ <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
+ <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
+ <property value="" name="QtBuild"/>
+ </properties>
+ <testcase result="pass" name="initTestCase"/>
+ <testcase result="pass" name="keyPressAndRelease"/>
+ <testcase result="pass" name="cleanupTestCase"/>
+ <system-err/>
+</testsuite>
diff --git a/tests/auto/testlib/selftests/expected_longstring.tap b/tests/auto/testlib/selftests/expected_longstring.tap
new file mode 100644
index 0000000000..ac870f2d53
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_longstring.tap
@@ -0,0 +1,23 @@
+TAP version 13
+# tst_LongString
+ok 1 - initTestCase()
+not ok 2 - failWithLongString()
+ ---
+ # Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.
+
+Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia.
+
+Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestibulum volutpat pretium libero. Cras id dui. Aenean ut eros et nisl sagittis vestibulum. Nullam nulla eros, ultricies sit amet, nonummy id, imperdiet feugiat, pede. Sed lectus. Donec mollis hendrerit risus. Phasellus nec sem in justo pellentesque facilisis. Etiam imperdiet imperdiet orci. Nunc nec neque. Phasellus leo dolor, tempus non, auctor et, hendrerit quis, nisi.
+
+Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo. Maecenas malesuada. Praesent congue erat at massa. Sed cursus turpis vitae tortor. Donec posuere vulputate arcu. Phasellus accumsan cursus velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed aliquam, nisi quis porttitor congue, elit erat euismod orci, ac placerat dolor lectus quis orci. Phasellus consectetuer vestibulum elit. Aenean tellus metus, bibendum sed, posuere ac, mattis non, nunc. Vestibulum fringilla pede sit amet augue. In turpis. Pellentesque posuere. Praesent turpis.
+
+Aenean posuere, tortor sed cursus feugiat, nunc augue blandit nunc, eu sollicitudin urna dolor sagittis lacus. Donec elit libero, sodales nec, volutpat a, suscipit non, turpis. Nullam sagittis. Suspendisse pulvinar, augue ac venenatis condimentum, sem libero volutpat nibh, nec pellentesque velit pede quis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce id purus. Ut varius tincidunt libero. Phasellus dolor. Maecenas vestibulum mollis diam. Pellentesque ut neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
+ at: tst_LongString::failWithLongString() (qtbase/tests/auto/testlib/selftests/longstring/tst_longstring.cpp:54)
+ file: qtbase/tests/auto/testlib/selftests/longstring/tst_longstring.cpp
+ line: 54
+ ...
+ok 3 - cleanupTestCase()
+1..3
+# tests 3
+# pass 2
+# fail 1
diff --git a/tests/auto/testlib/selftests/expected_maxwarnings.tap b/tests/auto/testlib/selftests/expected_maxwarnings.tap
new file mode 100644
index 0000000000..57bfbd8f8d
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_maxwarnings.tap
@@ -0,0 +1,2011 @@
+TAP version 13
+# MaxWarnings
+ok 1 - initTestCase()
+# 0
+# 1
+# 2
+# 3
+# 4
+# 5
+# 6
+# 7
+# 8
+# 9
+# 10
+# 11
+# 12
+# 13
+# 14
+# 15
+# 16
+# 17
+# 18
+# 19
+# 20
+# 21
+# 22
+# 23
+# 24
+# 25
+# 26
+# 27
+# 28
+# 29
+# 30
+# 31
+# 32
+# 33
+# 34
+# 35
+# 36
+# 37
+# 38
+# 39
+# 40
+# 41
+# 42
+# 43
+# 44
+# 45
+# 46
+# 47
+# 48
+# 49
+# 50
+# 51
+# 52
+# 53
+# 54
+# 55
+# 56
+# 57
+# 58
+# 59
+# 60
+# 61
+# 62
+# 63
+# 64
+# 65
+# 66
+# 67
+# 68
+# 69
+# 70
+# 71
+# 72
+# 73
+# 74
+# 75
+# 76
+# 77
+# 78
+# 79
+# 80
+# 81
+# 82
+# 83
+# 84
+# 85
+# 86
+# 87
+# 88
+# 89
+# 90
+# 91
+# 92
+# 93
+# 94
+# 95
+# 96
+# 97
+# 98
+# 99
+# 100
+# 101
+# 102
+# 103
+# 104
+# 105
+# 106
+# 107
+# 108
+# 109
+# 110
+# 111
+# 112
+# 113
+# 114
+# 115
+# 116
+# 117
+# 118
+# 119
+# 120
+# 121
+# 122
+# 123
+# 124
+# 125
+# 126
+# 127
+# 128
+# 129
+# 130
+# 131
+# 132
+# 133
+# 134
+# 135
+# 136
+# 137
+# 138
+# 139
+# 140
+# 141
+# 142
+# 143
+# 144
+# 145
+# 146
+# 147
+# 148
+# 149
+# 150
+# 151
+# 152
+# 153
+# 154
+# 155
+# 156
+# 157
+# 158
+# 159
+# 160
+# 161
+# 162
+# 163
+# 164
+# 165
+# 166
+# 167
+# 168
+# 169
+# 170
+# 171
+# 172
+# 173
+# 174
+# 175
+# 176
+# 177
+# 178
+# 179
+# 180
+# 181
+# 182
+# 183
+# 184
+# 185
+# 186
+# 187
+# 188
+# 189
+# 190
+# 191
+# 192
+# 193
+# 194
+# 195
+# 196
+# 197
+# 198
+# 199
+# 200
+# 201
+# 202
+# 203
+# 204
+# 205
+# 206
+# 207
+# 208
+# 209
+# 210
+# 211
+# 212
+# 213
+# 214
+# 215
+# 216
+# 217
+# 218
+# 219
+# 220
+# 221
+# 222
+# 223
+# 224
+# 225
+# 226
+# 227
+# 228
+# 229
+# 230
+# 231
+# 232
+# 233
+# 234
+# 235
+# 236
+# 237
+# 238
+# 239
+# 240
+# 241
+# 242
+# 243
+# 244
+# 245
+# 246
+# 247
+# 248
+# 249
+# 250
+# 251
+# 252
+# 253
+# 254
+# 255
+# 256
+# 257
+# 258
+# 259
+# 260
+# 261
+# 262
+# 263
+# 264
+# 265
+# 266
+# 267
+# 268
+# 269
+# 270
+# 271
+# 272
+# 273
+# 274
+# 275
+# 276
+# 277
+# 278
+# 279
+# 280
+# 281
+# 282
+# 283
+# 284
+# 285
+# 286
+# 287
+# 288
+# 289
+# 290
+# 291
+# 292
+# 293
+# 294
+# 295
+# 296
+# 297
+# 298
+# 299
+# 300
+# 301
+# 302
+# 303
+# 304
+# 305
+# 306
+# 307
+# 308
+# 309
+# 310
+# 311
+# 312
+# 313
+# 314
+# 315
+# 316
+# 317
+# 318
+# 319
+# 320
+# 321
+# 322
+# 323
+# 324
+# 325
+# 326
+# 327
+# 328
+# 329
+# 330
+# 331
+# 332
+# 333
+# 334
+# 335
+# 336
+# 337
+# 338
+# 339
+# 340
+# 341
+# 342
+# 343
+# 344
+# 345
+# 346
+# 347
+# 348
+# 349
+# 350
+# 351
+# 352
+# 353
+# 354
+# 355
+# 356
+# 357
+# 358
+# 359
+# 360
+# 361
+# 362
+# 363
+# 364
+# 365
+# 366
+# 367
+# 368
+# 369
+# 370
+# 371
+# 372
+# 373
+# 374
+# 375
+# 376
+# 377
+# 378
+# 379
+# 380
+# 381
+# 382
+# 383
+# 384
+# 385
+# 386
+# 387
+# 388
+# 389
+# 390
+# 391
+# 392
+# 393
+# 394
+# 395
+# 396
+# 397
+# 398
+# 399
+# 400
+# 401
+# 402
+# 403
+# 404
+# 405
+# 406
+# 407
+# 408
+# 409
+# 410
+# 411
+# 412
+# 413
+# 414
+# 415
+# 416
+# 417
+# 418
+# 419
+# 420
+# 421
+# 422
+# 423
+# 424
+# 425
+# 426
+# 427
+# 428
+# 429
+# 430
+# 431
+# 432
+# 433
+# 434
+# 435
+# 436
+# 437
+# 438
+# 439
+# 440
+# 441
+# 442
+# 443
+# 444
+# 445
+# 446
+# 447
+# 448
+# 449
+# 450
+# 451
+# 452
+# 453
+# 454
+# 455
+# 456
+# 457
+# 458
+# 459
+# 460
+# 461
+# 462
+# 463
+# 464
+# 465
+# 466
+# 467
+# 468
+# 469
+# 470
+# 471
+# 472
+# 473
+# 474
+# 475
+# 476
+# 477
+# 478
+# 479
+# 480
+# 481
+# 482
+# 483
+# 484
+# 485
+# 486
+# 487
+# 488
+# 489
+# 490
+# 491
+# 492
+# 493
+# 494
+# 495
+# 496
+# 497
+# 498
+# 499
+# 500
+# 501
+# 502
+# 503
+# 504
+# 505
+# 506
+# 507
+# 508
+# 509
+# 510
+# 511
+# 512
+# 513
+# 514
+# 515
+# 516
+# 517
+# 518
+# 519
+# 520
+# 521
+# 522
+# 523
+# 524
+# 525
+# 526
+# 527
+# 528
+# 529
+# 530
+# 531
+# 532
+# 533
+# 534
+# 535
+# 536
+# 537
+# 538
+# 539
+# 540
+# 541
+# 542
+# 543
+# 544
+# 545
+# 546
+# 547
+# 548
+# 549
+# 550
+# 551
+# 552
+# 553
+# 554
+# 555
+# 556
+# 557
+# 558
+# 559
+# 560
+# 561
+# 562
+# 563
+# 564
+# 565
+# 566
+# 567
+# 568
+# 569
+# 570
+# 571
+# 572
+# 573
+# 574
+# 575
+# 576
+# 577
+# 578
+# 579
+# 580
+# 581
+# 582
+# 583
+# 584
+# 585
+# 586
+# 587
+# 588
+# 589
+# 590
+# 591
+# 592
+# 593
+# 594
+# 595
+# 596
+# 597
+# 598
+# 599
+# 600
+# 601
+# 602
+# 603
+# 604
+# 605
+# 606
+# 607
+# 608
+# 609
+# 610
+# 611
+# 612
+# 613
+# 614
+# 615
+# 616
+# 617
+# 618
+# 619
+# 620
+# 621
+# 622
+# 623
+# 624
+# 625
+# 626
+# 627
+# 628
+# 629
+# 630
+# 631
+# 632
+# 633
+# 634
+# 635
+# 636
+# 637
+# 638
+# 639
+# 640
+# 641
+# 642
+# 643
+# 644
+# 645
+# 646
+# 647
+# 648
+# 649
+# 650
+# 651
+# 652
+# 653
+# 654
+# 655
+# 656
+# 657
+# 658
+# 659
+# 660
+# 661
+# 662
+# 663
+# 664
+# 665
+# 666
+# 667
+# 668
+# 669
+# 670
+# 671
+# 672
+# 673
+# 674
+# 675
+# 676
+# 677
+# 678
+# 679
+# 680
+# 681
+# 682
+# 683
+# 684
+# 685
+# 686
+# 687
+# 688
+# 689
+# 690
+# 691
+# 692
+# 693
+# 694
+# 695
+# 696
+# 697
+# 698
+# 699
+# 700
+# 701
+# 702
+# 703
+# 704
+# 705
+# 706
+# 707
+# 708
+# 709
+# 710
+# 711
+# 712
+# 713
+# 714
+# 715
+# 716
+# 717
+# 718
+# 719
+# 720
+# 721
+# 722
+# 723
+# 724
+# 725
+# 726
+# 727
+# 728
+# 729
+# 730
+# 731
+# 732
+# 733
+# 734
+# 735
+# 736
+# 737
+# 738
+# 739
+# 740
+# 741
+# 742
+# 743
+# 744
+# 745
+# 746
+# 747
+# 748
+# 749
+# 750
+# 751
+# 752
+# 753
+# 754
+# 755
+# 756
+# 757
+# 758
+# 759
+# 760
+# 761
+# 762
+# 763
+# 764
+# 765
+# 766
+# 767
+# 768
+# 769
+# 770
+# 771
+# 772
+# 773
+# 774
+# 775
+# 776
+# 777
+# 778
+# 779
+# 780
+# 781
+# 782
+# 783
+# 784
+# 785
+# 786
+# 787
+# 788
+# 789
+# 790
+# 791
+# 792
+# 793
+# 794
+# 795
+# 796
+# 797
+# 798
+# 799
+# 800
+# 801
+# 802
+# 803
+# 804
+# 805
+# 806
+# 807
+# 808
+# 809
+# 810
+# 811
+# 812
+# 813
+# 814
+# 815
+# 816
+# 817
+# 818
+# 819
+# 820
+# 821
+# 822
+# 823
+# 824
+# 825
+# 826
+# 827
+# 828
+# 829
+# 830
+# 831
+# 832
+# 833
+# 834
+# 835
+# 836
+# 837
+# 838
+# 839
+# 840
+# 841
+# 842
+# 843
+# 844
+# 845
+# 846
+# 847
+# 848
+# 849
+# 850
+# 851
+# 852
+# 853
+# 854
+# 855
+# 856
+# 857
+# 858
+# 859
+# 860
+# 861
+# 862
+# 863
+# 864
+# 865
+# 866
+# 867
+# 868
+# 869
+# 870
+# 871
+# 872
+# 873
+# 874
+# 875
+# 876
+# 877
+# 878
+# 879
+# 880
+# 881
+# 882
+# 883
+# 884
+# 885
+# 886
+# 887
+# 888
+# 889
+# 890
+# 891
+# 892
+# 893
+# 894
+# 895
+# 896
+# 897
+# 898
+# 899
+# 900
+# 901
+# 902
+# 903
+# 904
+# 905
+# 906
+# 907
+# 908
+# 909
+# 910
+# 911
+# 912
+# 913
+# 914
+# 915
+# 916
+# 917
+# 918
+# 919
+# 920
+# 921
+# 922
+# 923
+# 924
+# 925
+# 926
+# 927
+# 928
+# 929
+# 930
+# 931
+# 932
+# 933
+# 934
+# 935
+# 936
+# 937
+# 938
+# 939
+# 940
+# 941
+# 942
+# 943
+# 944
+# 945
+# 946
+# 947
+# 948
+# 949
+# 950
+# 951
+# 952
+# 953
+# 954
+# 955
+# 956
+# 957
+# 958
+# 959
+# 960
+# 961
+# 962
+# 963
+# 964
+# 965
+# 966
+# 967
+# 968
+# 969
+# 970
+# 971
+# 972
+# 973
+# 974
+# 975
+# 976
+# 977
+# 978
+# 979
+# 980
+# 981
+# 982
+# 983
+# 984
+# 985
+# 986
+# 987
+# 988
+# 989
+# 990
+# 991
+# 992
+# 993
+# 994
+# 995
+# 996
+# 997
+# 998
+# 999
+# 1000
+# 1001
+# 1002
+# 1003
+# 1004
+# 1005
+# 1006
+# 1007
+# 1008
+# 1009
+# 1010
+# 1011
+# 1012
+# 1013
+# 1014
+# 1015
+# 1016
+# 1017
+# 1018
+# 1019
+# 1020
+# 1021
+# 1022
+# 1023
+# 1024
+# 1025
+# 1026
+# 1027
+# 1028
+# 1029
+# 1030
+# 1031
+# 1032
+# 1033
+# 1034
+# 1035
+# 1036
+# 1037
+# 1038
+# 1039
+# 1040
+# 1041
+# 1042
+# 1043
+# 1044
+# 1045
+# 1046
+# 1047
+# 1048
+# 1049
+# 1050
+# 1051
+# 1052
+# 1053
+# 1054
+# 1055
+# 1056
+# 1057
+# 1058
+# 1059
+# 1060
+# 1061
+# 1062
+# 1063
+# 1064
+# 1065
+# 1066
+# 1067
+# 1068
+# 1069
+# 1070
+# 1071
+# 1072
+# 1073
+# 1074
+# 1075
+# 1076
+# 1077
+# 1078
+# 1079
+# 1080
+# 1081
+# 1082
+# 1083
+# 1084
+# 1085
+# 1086
+# 1087
+# 1088
+# 1089
+# 1090
+# 1091
+# 1092
+# 1093
+# 1094
+# 1095
+# 1096
+# 1097
+# 1098
+# 1099
+# 1100
+# 1101
+# 1102
+# 1103
+# 1104
+# 1105
+# 1106
+# 1107
+# 1108
+# 1109
+# 1110
+# 1111
+# 1112
+# 1113
+# 1114
+# 1115
+# 1116
+# 1117
+# 1118
+# 1119
+# 1120
+# 1121
+# 1122
+# 1123
+# 1124
+# 1125
+# 1126
+# 1127
+# 1128
+# 1129
+# 1130
+# 1131
+# 1132
+# 1133
+# 1134
+# 1135
+# 1136
+# 1137
+# 1138
+# 1139
+# 1140
+# 1141
+# 1142
+# 1143
+# 1144
+# 1145
+# 1146
+# 1147
+# 1148
+# 1149
+# 1150
+# 1151
+# 1152
+# 1153
+# 1154
+# 1155
+# 1156
+# 1157
+# 1158
+# 1159
+# 1160
+# 1161
+# 1162
+# 1163
+# 1164
+# 1165
+# 1166
+# 1167
+# 1168
+# 1169
+# 1170
+# 1171
+# 1172
+# 1173
+# 1174
+# 1175
+# 1176
+# 1177
+# 1178
+# 1179
+# 1180
+# 1181
+# 1182
+# 1183
+# 1184
+# 1185
+# 1186
+# 1187
+# 1188
+# 1189
+# 1190
+# 1191
+# 1192
+# 1193
+# 1194
+# 1195
+# 1196
+# 1197
+# 1198
+# 1199
+# 1200
+# 1201
+# 1202
+# 1203
+# 1204
+# 1205
+# 1206
+# 1207
+# 1208
+# 1209
+# 1210
+# 1211
+# 1212
+# 1213
+# 1214
+# 1215
+# 1216
+# 1217
+# 1218
+# 1219
+# 1220
+# 1221
+# 1222
+# 1223
+# 1224
+# 1225
+# 1226
+# 1227
+# 1228
+# 1229
+# 1230
+# 1231
+# 1232
+# 1233
+# 1234
+# 1235
+# 1236
+# 1237
+# 1238
+# 1239
+# 1240
+# 1241
+# 1242
+# 1243
+# 1244
+# 1245
+# 1246
+# 1247
+# 1248
+# 1249
+# 1250
+# 1251
+# 1252
+# 1253
+# 1254
+# 1255
+# 1256
+# 1257
+# 1258
+# 1259
+# 1260
+# 1261
+# 1262
+# 1263
+# 1264
+# 1265
+# 1266
+# 1267
+# 1268
+# 1269
+# 1270
+# 1271
+# 1272
+# 1273
+# 1274
+# 1275
+# 1276
+# 1277
+# 1278
+# 1279
+# 1280
+# 1281
+# 1282
+# 1283
+# 1284
+# 1285
+# 1286
+# 1287
+# 1288
+# 1289
+# 1290
+# 1291
+# 1292
+# 1293
+# 1294
+# 1295
+# 1296
+# 1297
+# 1298
+# 1299
+# 1300
+# 1301
+# 1302
+# 1303
+# 1304
+# 1305
+# 1306
+# 1307
+# 1308
+# 1309
+# 1310
+# 1311
+# 1312
+# 1313
+# 1314
+# 1315
+# 1316
+# 1317
+# 1318
+# 1319
+# 1320
+# 1321
+# 1322
+# 1323
+# 1324
+# 1325
+# 1326
+# 1327
+# 1328
+# 1329
+# 1330
+# 1331
+# 1332
+# 1333
+# 1334
+# 1335
+# 1336
+# 1337
+# 1338
+# 1339
+# 1340
+# 1341
+# 1342
+# 1343
+# 1344
+# 1345
+# 1346
+# 1347
+# 1348
+# 1349
+# 1350
+# 1351
+# 1352
+# 1353
+# 1354
+# 1355
+# 1356
+# 1357
+# 1358
+# 1359
+# 1360
+# 1361
+# 1362
+# 1363
+# 1364
+# 1365
+# 1366
+# 1367
+# 1368
+# 1369
+# 1370
+# 1371
+# 1372
+# 1373
+# 1374
+# 1375
+# 1376
+# 1377
+# 1378
+# 1379
+# 1380
+# 1381
+# 1382
+# 1383
+# 1384
+# 1385
+# 1386
+# 1387
+# 1388
+# 1389
+# 1390
+# 1391
+# 1392
+# 1393
+# 1394
+# 1395
+# 1396
+# 1397
+# 1398
+# 1399
+# 1400
+# 1401
+# 1402
+# 1403
+# 1404
+# 1405
+# 1406
+# 1407
+# 1408
+# 1409
+# 1410
+# 1411
+# 1412
+# 1413
+# 1414
+# 1415
+# 1416
+# 1417
+# 1418
+# 1419
+# 1420
+# 1421
+# 1422
+# 1423
+# 1424
+# 1425
+# 1426
+# 1427
+# 1428
+# 1429
+# 1430
+# 1431
+# 1432
+# 1433
+# 1434
+# 1435
+# 1436
+# 1437
+# 1438
+# 1439
+# 1440
+# 1441
+# 1442
+# 1443
+# 1444
+# 1445
+# 1446
+# 1447
+# 1448
+# 1449
+# 1450
+# 1451
+# 1452
+# 1453
+# 1454
+# 1455
+# 1456
+# 1457
+# 1458
+# 1459
+# 1460
+# 1461
+# 1462
+# 1463
+# 1464
+# 1465
+# 1466
+# 1467
+# 1468
+# 1469
+# 1470
+# 1471
+# 1472
+# 1473
+# 1474
+# 1475
+# 1476
+# 1477
+# 1478
+# 1479
+# 1480
+# 1481
+# 1482
+# 1483
+# 1484
+# 1485
+# 1486
+# 1487
+# 1488
+# 1489
+# 1490
+# 1491
+# 1492
+# 1493
+# 1494
+# 1495
+# 1496
+# 1497
+# 1498
+# 1499
+# 1500
+# 1501
+# 1502
+# 1503
+# 1504
+# 1505
+# 1506
+# 1507
+# 1508
+# 1509
+# 1510
+# 1511
+# 1512
+# 1513
+# 1514
+# 1515
+# 1516
+# 1517
+# 1518
+# 1519
+# 1520
+# 1521
+# 1522
+# 1523
+# 1524
+# 1525
+# 1526
+# 1527
+# 1528
+# 1529
+# 1530
+# 1531
+# 1532
+# 1533
+# 1534
+# 1535
+# 1536
+# 1537
+# 1538
+# 1539
+# 1540
+# 1541
+# 1542
+# 1543
+# 1544
+# 1545
+# 1546
+# 1547
+# 1548
+# 1549
+# 1550
+# 1551
+# 1552
+# 1553
+# 1554
+# 1555
+# 1556
+# 1557
+# 1558
+# 1559
+# 1560
+# 1561
+# 1562
+# 1563
+# 1564
+# 1565
+# 1566
+# 1567
+# 1568
+# 1569
+# 1570
+# 1571
+# 1572
+# 1573
+# 1574
+# 1575
+# 1576
+# 1577
+# 1578
+# 1579
+# 1580
+# 1581
+# 1582
+# 1583
+# 1584
+# 1585
+# 1586
+# 1587
+# 1588
+# 1589
+# 1590
+# 1591
+# 1592
+# 1593
+# 1594
+# 1595
+# 1596
+# 1597
+# 1598
+# 1599
+# 1600
+# 1601
+# 1602
+# 1603
+# 1604
+# 1605
+# 1606
+# 1607
+# 1608
+# 1609
+# 1610
+# 1611
+# 1612
+# 1613
+# 1614
+# 1615
+# 1616
+# 1617
+# 1618
+# 1619
+# 1620
+# 1621
+# 1622
+# 1623
+# 1624
+# 1625
+# 1626
+# 1627
+# 1628
+# 1629
+# 1630
+# 1631
+# 1632
+# 1633
+# 1634
+# 1635
+# 1636
+# 1637
+# 1638
+# 1639
+# 1640
+# 1641
+# 1642
+# 1643
+# 1644
+# 1645
+# 1646
+# 1647
+# 1648
+# 1649
+# 1650
+# 1651
+# 1652
+# 1653
+# 1654
+# 1655
+# 1656
+# 1657
+# 1658
+# 1659
+# 1660
+# 1661
+# 1662
+# 1663
+# 1664
+# 1665
+# 1666
+# 1667
+# 1668
+# 1669
+# 1670
+# 1671
+# 1672
+# 1673
+# 1674
+# 1675
+# 1676
+# 1677
+# 1678
+# 1679
+# 1680
+# 1681
+# 1682
+# 1683
+# 1684
+# 1685
+# 1686
+# 1687
+# 1688
+# 1689
+# 1690
+# 1691
+# 1692
+# 1693
+# 1694
+# 1695
+# 1696
+# 1697
+# 1698
+# 1699
+# 1700
+# 1701
+# 1702
+# 1703
+# 1704
+# 1705
+# 1706
+# 1707
+# 1708
+# 1709
+# 1710
+# 1711
+# 1712
+# 1713
+# 1714
+# 1715
+# 1716
+# 1717
+# 1718
+# 1719
+# 1720
+# 1721
+# 1722
+# 1723
+# 1724
+# 1725
+# 1726
+# 1727
+# 1728
+# 1729
+# 1730
+# 1731
+# 1732
+# 1733
+# 1734
+# 1735
+# 1736
+# 1737
+# 1738
+# 1739
+# 1740
+# 1741
+# 1742
+# 1743
+# 1744
+# 1745
+# 1746
+# 1747
+# 1748
+# 1749
+# 1750
+# 1751
+# 1752
+# 1753
+# 1754
+# 1755
+# 1756
+# 1757
+# 1758
+# 1759
+# 1760
+# 1761
+# 1762
+# 1763
+# 1764
+# 1765
+# 1766
+# 1767
+# 1768
+# 1769
+# 1770
+# 1771
+# 1772
+# 1773
+# 1774
+# 1775
+# 1776
+# 1777
+# 1778
+# 1779
+# 1780
+# 1781
+# 1782
+# 1783
+# 1784
+# 1785
+# 1786
+# 1787
+# 1788
+# 1789
+# 1790
+# 1791
+# 1792
+# 1793
+# 1794
+# 1795
+# 1796
+# 1797
+# 1798
+# 1799
+# 1800
+# 1801
+# 1802
+# 1803
+# 1804
+# 1805
+# 1806
+# 1807
+# 1808
+# 1809
+# 1810
+# 1811
+# 1812
+# 1813
+# 1814
+# 1815
+# 1816
+# 1817
+# 1818
+# 1819
+# 1820
+# 1821
+# 1822
+# 1823
+# 1824
+# 1825
+# 1826
+# 1827
+# 1828
+# 1829
+# 1830
+# 1831
+# 1832
+# 1833
+# 1834
+# 1835
+# 1836
+# 1837
+# 1838
+# 1839
+# 1840
+# 1841
+# 1842
+# 1843
+# 1844
+# 1845
+# 1846
+# 1847
+# 1848
+# 1849
+# 1850
+# 1851
+# 1852
+# 1853
+# 1854
+# 1855
+# 1856
+# 1857
+# 1858
+# 1859
+# 1860
+# 1861
+# 1862
+# 1863
+# 1864
+# 1865
+# 1866
+# 1867
+# 1868
+# 1869
+# 1870
+# 1871
+# 1872
+# 1873
+# 1874
+# 1875
+# 1876
+# 1877
+# 1878
+# 1879
+# 1880
+# 1881
+# 1882
+# 1883
+# 1884
+# 1885
+# 1886
+# 1887
+# 1888
+# 1889
+# 1890
+# 1891
+# 1892
+# 1893
+# 1894
+# 1895
+# 1896
+# 1897
+# 1898
+# 1899
+# 1900
+# 1901
+# 1902
+# 1903
+# 1904
+# 1905
+# 1906
+# 1907
+# 1908
+# 1909
+# 1910
+# 1911
+# 1912
+# 1913
+# 1914
+# 1915
+# 1916
+# 1917
+# 1918
+# 1919
+# 1920
+# 1921
+# 1922
+# 1923
+# 1924
+# 1925
+# 1926
+# 1927
+# 1928
+# 1929
+# 1930
+# 1931
+# 1932
+# 1933
+# 1934
+# 1935
+# 1936
+# 1937
+# 1938
+# 1939
+# 1940
+# 1941
+# 1942
+# 1943
+# 1944
+# 1945
+# 1946
+# 1947
+# 1948
+# 1949
+# 1950
+# 1951
+# 1952
+# 1953
+# 1954
+# 1955
+# 1956
+# 1957
+# 1958
+# 1959
+# 1960
+# 1961
+# 1962
+# 1963
+# 1964
+# 1965
+# 1966
+# 1967
+# 1968
+# 1969
+# 1970
+# 1971
+# 1972
+# 1973
+# 1974
+# 1975
+# 1976
+# 1977
+# 1978
+# 1979
+# 1980
+# 1981
+# 1982
+# 1983
+# 1984
+# 1985
+# 1986
+# 1987
+# 1988
+# 1989
+# 1990
+# 1991
+# 1992
+# 1993
+# 1994
+# 1995
+# 1996
+# 1997
+# 1998
+# 1999
+# 2000
+# Maximum amount of warnings exceeded. Use -maxwarnings to override.
+ok 2 - warn()
+ok 3 - cleanupTestCase()
+1..3
+# tests 3
+# pass 3
+# fail 0
diff --git a/tests/auto/testlib/selftests/expected_pairdiagnostics.tap b/tests/auto/testlib/selftests/expected_pairdiagnostics.tap
new file mode 100644
index 0000000000..9c45880c2d
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_pairdiagnostics.tap
@@ -0,0 +1,32 @@
+TAP version 13
+# tst_PairDiagnostics
+ok 1 - initTestCase()
+not ok 2 - testQPair()
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: "QPair(1,2)" (pair2)
+ found: "QPair(1,1)" (pair1)
+ expected: "QPair(1,2)" (pair2)
+ actual: "QPair(1,1)" (pair1)
+ at: tst_PairDiagnostics::testQPair() (qtbase/tests/auto/testlib/selftests/pairdiagnostics/tst_pairdiagnostics.cpp:51)
+ file: qtbase/tests/auto/testlib/selftests/pairdiagnostics/tst_pairdiagnostics.cpp
+ line: 51
+ ...
+not ok 3 - testStdPair()
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: "std::pair(1,2)" (pair2)
+ found: "std::pair(1,1)" (pair1)
+ expected: "std::pair(1,2)" (pair2)
+ actual: "std::pair(1,1)" (pair1)
+ at: tst_PairDiagnostics::testStdPair() (qtbase/tests/auto/testlib/selftests/pairdiagnostics/tst_pairdiagnostics.cpp:58)
+ file: qtbase/tests/auto/testlib/selftests/pairdiagnostics/tst_pairdiagnostics.cpp
+ line: 58
+ ...
+ok 4 - cleanupTestCase()
+1..4
+# tests 4
+# pass 2
+# fail 2
diff --git a/tests/auto/testlib/selftests/expected_singleskip.tap b/tests/auto/testlib/selftests/expected_singleskip.tap
new file mode 100644
index 0000000000..2cc09e7d26
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_singleskip.tap
@@ -0,0 +1,9 @@
+TAP version 13
+# tst_SingleSkip
+ok 1 - initTestCase()
+ok 2 - myTest() # SKIP skipping test
+ok 3 - cleanupTestCase()
+1..3
+# tests 3
+# pass 2
+# fail 0
diff --git a/tests/auto/testlib/selftests/expected_skip.tap b/tests/auto/testlib/selftests/expected_skip.tap
new file mode 100644
index 0000000000..adf9f692a9
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_skip.tap
@@ -0,0 +1,13 @@
+TAP version 13
+# tst_Skip
+ok 1 - initTestCase()
+ok 2 - test() # SKIP skipping all
+ok 3 - emptytest() # SKIP skipping all
+ok 4 - singleSkip(local 1) # SKIP skipping one
+# this line should only be reached once (true)
+ok 5 - singleSkip(local 2)
+ok 6 - cleanupTestCase()
+1..6
+# tests 6
+# pass 3
+# fail 0
diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.tap b/tests/auto/testlib/selftests/expected_skipcleanup.tap
new file mode 100644
index 0000000000..4a3f8f852c
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_skipcleanup.tap
@@ -0,0 +1,9 @@
+TAP version 13
+# tst_SkipCleanup
+ok 1 - initTestCase()
+ok 2 - aTestFunction()
+ok 3 - cleanupTestCase() # SKIP Skip inside cleanupTestCase.
+1..3
+# tests 3
+# pass 2
+# fail 0
diff --git a/tests/auto/testlib/selftests/expected_skipinit.tap b/tests/auto/testlib/selftests/expected_skipinit.tap
new file mode 100644
index 0000000000..1fc38e79aa
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_skipinit.tap
@@ -0,0 +1,8 @@
+TAP version 13
+# tst_SkipInit
+ok 1 - initTestCase() # SKIP Skip inside initTestCase. This should skip all tests in the class.
+ok 2 - cleanupTestCase()
+1..2
+# tests 2
+# pass 1
+# fail 0
diff --git a/tests/auto/testlib/selftests/expected_skipinitdata.tap b/tests/auto/testlib/selftests/expected_skipinitdata.tap
new file mode 100644
index 0000000000..1ea96ca74e
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_skipinitdata.tap
@@ -0,0 +1,7 @@
+TAP version 13
+# tst_SkipInitData
+ok 1 - initTestCase() # SKIP Skip inside initTestCase_data. This should skip all tests in the class.
+1..1
+# tests 1
+# pass 0
+# fail 0
diff --git a/tests/auto/testlib/selftests/expected_sleep.tap b/tests/auto/testlib/selftests/expected_sleep.tap
new file mode 100644
index 0000000000..7caef214d2
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_sleep.tap
@@ -0,0 +1,9 @@
+TAP version 13
+# tst_Sleep
+ok 1 - initTestCase()
+ok 2 - sleep()
+ok 3 - cleanupTestCase()
+1..3
+# tests 3
+# pass 3
+# fail 0
diff --git a/tests/auto/testlib/selftests/expected_strcmp.tap b/tests/auto/testlib/selftests/expected_strcmp.tap
new file mode 100644
index 0000000000..af368e4745
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_strcmp.tap
@@ -0,0 +1,87 @@
+TAP version 13
+# tst_StrCmp
+ok 1 - initTestCase()
+ok 2 - compareCharStars()
+not ok 3 - compareByteArray() # TODO Next test should fail
+ ---
+ at: tst_StrCmp::compareByteArray() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:75)
+ file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
+ line: 75
+ ...
+not ok 3 - compareByteArray() # TODO Next test should fail
+ ---
+ at: tst_StrCmp::compareByteArray() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:82)
+ file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
+ line: 82
+ ...
+not ok 3 - compareByteArray() # TODO Next test should fail
+ ---
+ at: tst_StrCmp::compareByteArray() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:89)
+ file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
+ line: 89
+ ...
+not ok 3 - compareByteArray()
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"... (b)
+ found: "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"... (a)
+ expected: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"... (b)
+ actual: "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"... (a)
+ at: tst_StrCmp::compareByteArray() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:96)
+ file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
+ line: 96
+ ...
+not ok 4 - failByteArray()
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: "cba" (QByteArray("cba"))
+ found: "abc" (QByteArray("abc"))
+ expected: "cba" (QByteArray("cba"))
+ actual: "abc" (QByteArray("abc"))
+ at: tst_StrCmp::failByteArray() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
+ line: 102
+ ...
+not ok 5 - failByteArrayNull()
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: "" (QByteArray())
+ found: "foo" (QByteArray("foo"))
+ expected: "" (QByteArray())
+ actual: "foo" (QByteArray("foo"))
+ at: tst_StrCmp::failByteArrayNull() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:108)
+ file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
+ line: 108
+ ...
+not ok 6 - failByteArrayEmpty()
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: "foo" (QByteArray("foo"))
+ found: "" (QByteArray(""))
+ expected: "foo" (QByteArray("foo"))
+ actual: "" (QByteArray(""))
+ at: tst_StrCmp::failByteArrayEmpty() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:113)
+ file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
+ line: 113
+ ...
+not ok 7 - failByteArraySingleChars()
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: "7" (QByteArray("7"))
+ found: "6" (QByteArray("6"))
+ expected: "7" (QByteArray("7"))
+ actual: "6" (QByteArray("6"))
+ at: tst_StrCmp::failByteArraySingleChars() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:120)
+ file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
+ line: 120
+ ...
+ok 8 - cleanupTestCase()
+1..8
+# tests 8
+# pass 3
+# fail 5
diff --git a/tests/auto/testlib/selftests/expected_subtest.tap b/tests/auto/testlib/selftests/expected_subtest.tap
new file mode 100644
index 0000000000..67fe7be570
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_subtest.tap
@@ -0,0 +1,68 @@
+TAP version 13
+# tst_Subtest
+# initTestCase initTestCase (null)
+ok 1 - initTestCase()
+# init test1 (null)
+# test1 test1 (null)
+# cleanup test1 (null)
+ok 2 - test1()
+# test2_data test2 (null)
+# test2_data end
+# init test2 data0
+# test2 test2 data0
+# test2 end
+# cleanup test2 data0
+ok 3 - test2(data0)
+# init test2 data1
+# test2 test2 data1
+# test2 end
+# cleanup test2 data1
+ok 4 - test2(data1)
+# init test2 data2
+# test2 test2 data2
+# test2 end
+# cleanup test2 data2
+ok 5 - test2(data2)
+# test3_data test3 (null)
+# test3_data end
+# init test3 data0
+# test2 test3 data0
+# test2 end
+# cleanup test3 data0
+ok 6 - test3(data0)
+# init test3 data1
+# test2 test3 data1
+not ok 7 - test3(data1)
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: "hello0" (QString("hello0"))
+ found: "hello1" (str)
+ expected: "hello0" (QString("hello0"))
+ actual: "hello1" (str)
+ at: tst_Subtest::test3() (qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp:141)
+ file: qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp
+ line: 141
+ ...
+# cleanup test3 data1
+# init test3 data2
+# test2 test3 data2
+not ok 8 - test3(data2)
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: "hello0" (QString("hello0"))
+ found: "hello2" (str)
+ expected: "hello0" (QString("hello0"))
+ actual: "hello2" (str)
+ at: tst_Subtest::test3() (qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp:141)
+ file: qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp
+ line: 141
+ ...
+# cleanup test3 data2
+# cleanupTestCase cleanupTestCase (null)
+ok 9 - cleanupTestCase()
+1..9
+# tests 9
+# pass 7
+# fail 2
diff --git a/tests/auto/testlib/selftests/expected_tuplediagnostics.lightxml b/tests/auto/testlib/selftests/expected_tuplediagnostics.lightxml
new file mode 100644
index 0000000000..810941d894
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_tuplediagnostics.lightxml
@@ -0,0 +1,34 @@
+<Environment>
+ <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
+ <QtBuild/>
+ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
+</Environment>
+<TestFunction name="initTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="testEmptyTuple">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="testSimpleTuple">
+<Incident type="fail" file="/localqtbase/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp" line="0">
+ <Description><![CDATA[Compared values are not the same
+ Actual (std::tuple<int>{1}): std::tuple(1)
+ Expected (std::tuple<int>{2}): std::tuple(2)]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="testTuple">
+<Incident type="fail" file="/localqtbase/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp" line="0">
+ <Description><![CDATA[Compared values are not the same
+ Actual (tuple1): std::tuple(42, 'Y', "tuple1")
+ Expected (tuple2): std::tuple(42, 'Y', "tuple2")]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="cleanupTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_tuplediagnostics.tap b/tests/auto/testlib/selftests/expected_tuplediagnostics.tap
new file mode 100644
index 0000000000..9e007c14e1
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_tuplediagnostics.tap
@@ -0,0 +1,33 @@
+TAP version 13
+# tst_TupleDiagnostics
+ok 1 - initTestCase()
+ok 2 - testEmptyTuple()
+not ok 3 - testSimpleTuple()
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: std::tuple(2) (std::tuple<int>{2})
+ found: std::tuple(1) (std::tuple<int>{1})
+ expected: std::tuple(2) (std::tuple<int>{2})
+ actual: std::tuple(1) (std::tuple<int>{1})
+ at: tst_TupleDiagnostics::testSimpleTuple() (/localqtbase/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp:53)
+ file: /localqtbase/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp
+ line: 53
+ ...
+not ok 4 - testTuple()
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: std::tuple(42, 'Y', "tuple2") (tuple2)
+ found: std::tuple(42, 'Y', "tuple1") (tuple1)
+ expected: std::tuple(42, 'Y', "tuple2") (tuple2)
+ actual: std::tuple(42, 'Y', "tuple1") (tuple1)
+ at: tst_TupleDiagnostics::testTuple() (/localqtbase/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp:60)
+ file: /localqtbase/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp
+ line: 60
+ ...
+ok 5 - cleanupTestCase()
+1..5
+# tests 5
+# pass 3
+# fail 2
diff --git a/tests/auto/testlib/selftests/expected_tuplediagnostics.teamcity b/tests/auto/testlib/selftests/expected_tuplediagnostics.teamcity
new file mode 100644
index 0000000000..a395857c60
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_tuplediagnostics.teamcity
@@ -0,0 +1,14 @@
+##teamcity[testSuiteStarted name='tst_TupleDiagnostics' flowId='tst_TupleDiagnostics']
+##teamcity[testStarted name='initTestCase()' flowId='tst_TupleDiagnostics']
+##teamcity[testFinished name='initTestCase()' flowId='tst_TupleDiagnostics']
+##teamcity[testStarted name='testEmptyTuple()' flowId='tst_TupleDiagnostics']
+##teamcity[testFinished name='testEmptyTuple()' flowId='tst_TupleDiagnostics']
+##teamcity[testStarted name='testSimpleTuple()' flowId='tst_TupleDiagnostics']
+##teamcity[testFailed name='testSimpleTuple()' message='Failure! |[Loc: /localqtbase/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp(0)|]' details='Compared values are not the same|n Actual (std::tuple<int>{1}): std::tuple(1)|n Expected (std::tuple<int>{2}): std::tuple(2)' flowId='tst_TupleDiagnostics']
+##teamcity[testFinished name='testSimpleTuple()' flowId='tst_TupleDiagnostics']
+##teamcity[testStarted name='testTuple()' flowId='tst_TupleDiagnostics']
+##teamcity[testFailed name='testTuple()' message='Failure! |[Loc: /localqtbase/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp(0)|]' details='Compared values are not the same|n Actual (tuple1): std::tuple(42, |'Y|', "tuple1")|n Expected (tuple2): std::tuple(42, |'Y|', "tuple2")' flowId='tst_TupleDiagnostics']
+##teamcity[testFinished name='testTuple()' flowId='tst_TupleDiagnostics']
+##teamcity[testStarted name='cleanupTestCase()' flowId='tst_TupleDiagnostics']
+##teamcity[testFinished name='cleanupTestCase()' flowId='tst_TupleDiagnostics']
+##teamcity[testSuiteFinished name='tst_TupleDiagnostics' flowId='tst_TupleDiagnostics']
diff --git a/tests/auto/testlib/selftests/expected_tuplediagnostics.txt b/tests/auto/testlib/selftests/expected_tuplediagnostics.txt
new file mode 100644
index 0000000000..ce568bf6c0
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_tuplediagnostics.txt
@@ -0,0 +1,15 @@
+********* Start testing of tst_TupleDiagnostics *********
+Config: Using QtTest library
+PASS : tst_TupleDiagnostics::initTestCase()
+PASS : tst_TupleDiagnostics::testEmptyTuple()
+FAIL! : tst_TupleDiagnostics::testSimpleTuple() Compared values are not the same
+ Actual (std::tuple<int>{1}): std::tuple(1)
+ Expected (std::tuple<int>{2}): std::tuple(2)
+ Loc: [/localqtbase/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp(0)]
+FAIL! : tst_TupleDiagnostics::testTuple() Compared values are not the same
+ Actual (tuple1): std::tuple(42, 'Y', "tuple1")
+ Expected (tuple2): std::tuple(42, 'Y', "tuple2")
+ Loc: [/localqtbase/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp(0)]
+PASS : tst_TupleDiagnostics::cleanupTestCase()
+Totals: 3 passed, 2 failed, 0 skipped, 0 blacklisted, 0ms
+********* Finished testing of tst_TupleDiagnostics *********
diff --git a/tests/auto/testlib/selftests/expected_tuplediagnostics.xml b/tests/auto/testlib/selftests/expected_tuplediagnostics.xml
new file mode 100644
index 0000000000..4c55a6d393
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_tuplediagnostics.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestCase name="tst_TupleDiagnostics">
+<Environment>
+ <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
+ <QtBuild/>
+ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
+</Environment>
+<TestFunction name="initTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="testEmptyTuple">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="testSimpleTuple">
+<Incident type="fail" file="/localqtbase/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp" line="0">
+ <Description><![CDATA[Compared values are not the same
+ Actual (std::tuple<int>{1}): std::tuple(1)
+ Expected (std::tuple<int>{2}): std::tuple(2)]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="testTuple">
+<Incident type="fail" file="/localqtbase/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp" line="0">
+ <Description><![CDATA[Compared values are not the same
+ Actual (tuple1): std::tuple(42, 'Y', "tuple1")
+ Expected (tuple2): std::tuple(42, 'Y', "tuple2")]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="cleanupTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
+</TestCase>
diff --git a/tests/auto/testlib/selftests/expected_tuplediagnostics.xunitxml b/tests/auto/testlib/selftests/expected_tuplediagnostics.xunitxml
new file mode 100644
index 0000000000..0a276a17f5
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_tuplediagnostics.xunitxml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite errors="0" failures="2" tests="5" name="tst_TupleDiagnostics">
+ <properties>
+ <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
+ <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
+ <property value="" name="QtBuild"/>
+ </properties>
+ <testcase result="pass" name="initTestCase"/>
+ <testcase result="pass" name="testEmptyTuple"/>
+ <testcase result="fail" name="testSimpleTuple">
+ <failure message="Compared values are not the same
+ Actual (std::tuple&lt;int&gt;{1}): std::tuple(1)
+ Expected (std::tuple&lt;int&gt;{2}): std::tuple(2)" result="fail"/>
+ </testcase>
+ <testcase result="fail" name="testTuple">
+ <failure message="Compared values are not the same
+ Actual (tuple1): std::tuple(42, &apos;Y&apos;, &quot;tuple1&quot;)
+ Expected (tuple2): std::tuple(42, &apos;Y&apos;, &quot;tuple2&quot;)" result="fail"/>
+ </testcase>
+ <testcase result="pass" name="cleanupTestCase"/>
+ <system-err/>
+</testsuite>
diff --git a/tests/auto/testlib/selftests/expected_verbose1.tap b/tests/auto/testlib/selftests/expected_verbose1.tap
new file mode 100644
index 0000000000..ad53e8f14e
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_verbose1.tap
@@ -0,0 +1,118 @@
+TAP version 13
+# tst_Counting
+ok 1 - initTestCase()
+ok 2 - testPassPass(row 1)
+ok 3 - testPassPass(row 2)
+ok 4 - testPassSkip(row 1)
+ok 5 - testPassSkip(row 2) # SKIP Skipping
+ok 6 - testPassFail(row 1)
+not ok 7 - testPassFail(row 2)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testPassFail() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+ok 8 - testSkipPass(row 1) # SKIP Skipping
+ok 9 - testSkipPass(row 2)
+ok 10 - testSkipSkip(row 1) # SKIP Skipping
+ok 11 - testSkipSkip(row 2) # SKIP Skipping
+ok 12 - testSkipFail(row 1) # SKIP Skipping
+not ok 13 - testSkipFail(row 2)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testSkipFail() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+not ok 14 - testFailPass(row 1)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testFailPass() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+ok 15 - testFailPass(row 2)
+not ok 16 - testFailSkip(row 1)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testFailSkip() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+ok 17 - testFailSkip(row 2) # SKIP Skipping
+not ok 18 - testFailFail(row 1)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testFailFail() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+not ok 19 - testFailFail(row 2)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testFailFail() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+ok 20 - testFailInInit(before)
+not ok 21 - testFailInInit(fail)
+ ---
+ # Fail in init()
+ at: tst_Counting::testFailInInit() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:221)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 221
+ ...
+ok 22 - testFailInInit(after)
+ok 23 - testFailInCleanup(before)
+# This test function should execute and then QFAIL in cleanup()
+not ok 24 - testFailInCleanup(fail)
+ ---
+ # Fail in cleanup()
+ at: tst_Counting::testFailInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:229)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 229
+ ...
+ok 25 - testFailInCleanup(after)
+ok 26 - testSkipInInit(before)
+ok 27 - testSkipInInit(skip) # SKIP Skip in init()
+ok 28 - testSkipInInit(after)
+ok 29 - testSkipInCleanup(before)
+# This test function should execute and then QSKIP in cleanup()
+ok 30 - testSkipInCleanup(skip) # SKIP Skip in cleanup()
+ok 31 - testSkipInCleanup(after)
+ok 32 - cleanupTestCase()
+1..32
+# tests 32
+# pass 16
+# fail 8
diff --git a/tests/auto/testlib/selftests/expected_verbose2.tap b/tests/auto/testlib/selftests/expected_verbose2.tap
new file mode 100644
index 0000000000..7e6a7280a4
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_verbose2.tap
@@ -0,0 +1,136 @@
+TAP version 13
+# tst_Counting
+ok 1 - initTestCase()
+# QVERIFY(true)
+# QCOMPARE(2 + 1, 3)
+ok 2 - testPassPass(row 1)
+# QVERIFY(true)
+# QCOMPARE(2 + 1, 3)
+ok 3 - testPassPass(row 2)
+# QVERIFY(true)
+# QCOMPARE(2 + 1, 3)
+ok 4 - testPassSkip(row 1)
+ok 5 - testPassSkip(row 2) # SKIP Skipping
+# QVERIFY(true)
+# QCOMPARE(2 + 1, 3)
+ok 6 - testPassFail(row 1)
+# QVERIFY(false)
+not ok 7 - testPassFail(row 2)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testPassFail() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+ok 8 - testSkipPass(row 1) # SKIP Skipping
+# QVERIFY(true)
+# QCOMPARE(2 + 1, 3)
+ok 9 - testSkipPass(row 2)
+ok 10 - testSkipSkip(row 1) # SKIP Skipping
+ok 11 - testSkipSkip(row 2) # SKIP Skipping
+ok 12 - testSkipFail(row 1) # SKIP Skipping
+# QVERIFY(false)
+not ok 13 - testSkipFail(row 2)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testSkipFail() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+# QVERIFY(false)
+not ok 14 - testFailPass(row 1)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testFailPass() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+# QVERIFY(true)
+# QCOMPARE(2 + 1, 3)
+ok 15 - testFailPass(row 2)
+# QVERIFY(false)
+not ok 16 - testFailSkip(row 1)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testFailSkip() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+ok 17 - testFailSkip(row 2) # SKIP Skipping
+# QVERIFY(false)
+not ok 18 - testFailFail(row 1)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testFailFail() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+# QVERIFY(false)
+not ok 19 - testFailFail(row 2)
+ ---
+ type: QVERIFY
+ message: Verification failed
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Counting::testFailFail() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:102)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 102
+ ...
+ok 20 - testFailInInit(before)
+not ok 21 - testFailInInit(fail)
+ ---
+ # Fail in init()
+ at: tst_Counting::testFailInInit() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:221)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 221
+ ...
+ok 22 - testFailInInit(after)
+ok 23 - testFailInCleanup(before)
+# This test function should execute and then QFAIL in cleanup()
+not ok 24 - testFailInCleanup(fail)
+ ---
+ # Fail in cleanup()
+ at: tst_Counting::testFailInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:229)
+ file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp
+ line: 229
+ ...
+ok 25 - testFailInCleanup(after)
+ok 26 - testSkipInInit(before)
+ok 27 - testSkipInInit(skip) # SKIP Skip in init()
+ok 28 - testSkipInInit(after)
+ok 29 - testSkipInCleanup(before)
+# This test function should execute and then QSKIP in cleanup()
+ok 30 - testSkipInCleanup(skip) # SKIP Skip in cleanup()
+ok 31 - testSkipInCleanup(after)
+ok 32 - cleanupTestCase()
+1..32
+# tests 32
+# pass 16
+# fail 8
diff --git a/tests/auto/testlib/selftests/expected_verifyexceptionthrown.tap b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.tap
new file mode 100644
index 0000000000..2b04c08cdb
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.tap
@@ -0,0 +1,53 @@
+TAP version 13
+# tst_VerifyExceptionThrown
+ok 1 - initTestCase()
+ok 2 - testCorrectStdTypes()
+ok 3 - testCorrectStdExceptions()
+ok 4 - testCorrectMyExceptions()
+not ok 5 - testFailInt()
+ ---
+ # Expected exception of type double to be thrown but unknown exception caught
+ at: tst_VerifyExceptionThrown::testFailInt() (qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp:115)
+ file: qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp
+ line: 115
+ ...
+not ok 6 - testFailStdString()
+ ---
+ # Expected exception of type char* to be thrown but unknown exception caught
+ at: tst_VerifyExceptionThrown::testFailStdString() (qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp:120)
+ file: qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp
+ line: 120
+ ...
+not ok 7 - testFailStdRuntimeError()
+ ---
+ # Expected exception of type std::runtime_error to be thrown but std::exception caught with message: logic error
+ at: tst_VerifyExceptionThrown::testFailStdRuntimeError() (qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp:125)
+ file: qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp
+ line: 125
+ ...
+not ok 8 - testFailMyException()
+ ---
+ # Expected exception of type MyBaseException to be thrown but std::exception caught with message: logic error
+ at: tst_VerifyExceptionThrown::testFailMyException() (qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp:130)
+ file: qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp
+ line: 130
+ ...
+not ok 9 - testFailMyDerivedException()
+ ---
+ # Expected exception of type std::runtime_error to be thrown but std::exception caught with message: MyDerivedException
+ at: tst_VerifyExceptionThrown::testFailMyDerivedException() (qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp:135)
+ file: qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp
+ line: 135
+ ...
+not ok 10 - testFailNoException()
+ ---
+ # Expected exception of type std::exception to be thrown but no exception caught
+ at: tst_VerifyExceptionThrown::testFailNoException() (qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp:140)
+ file: qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp
+ line: 140
+ ...
+ok 11 - cleanupTestCase()
+1..11
+# tests 11
+# pass 5
+# fail 6
diff --git a/tests/auto/testlib/selftests/expected_warnings.tap b/tests/auto/testlib/selftests/expected_warnings.tap
new file mode 100644
index 0000000000..0e357cb770
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_warnings.tap
@@ -0,0 +1,42 @@
+TAP version 13
+# tst_Warnings
+ok 1 - initTestCase()
+# Warning
+# Warning
+# Debug
+# Debug
+# Info
+# Info
+# Baba
+# Baba
+# Bubublabla
+# Babablabla
+ok 2 - testWarnings()
+# Did not receive message: "Warning0"
+# Did not receive message: "Warning1"
+not ok 3 - testMissingWarnings()
+ ---
+ # Not all expected messages were received
+ ...
+# Did not receive any message matching: "Warning\s\d"
+not ok 4 - testMissingWarningsRegularExpression()
+ ---
+ # Not all expected messages were received
+ ...
+# Did not receive message: "Warning0"
+# Did not receive message: "Warning1"
+not ok 5 - testMissingWarningsWithData(first row)
+ ---
+ # Not all expected messages were received
+ ...
+# Did not receive message: "Warning0"
+# Did not receive message: "Warning1"
+not ok 6 - testMissingWarningsWithData(second row)
+ ---
+ # Not all expected messages were received
+ ...
+ok 7 - cleanupTestCase()
+1..7
+# tests 7
+# pass 3
+# fail 4
diff --git a/tests/auto/testlib/selftests/expected_xunit.tap b/tests/auto/testlib/selftests/expected_xunit.tap
new file mode 100644
index 0000000000..13ff7e45a3
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_xunit.tap
@@ -0,0 +1,44 @@
+TAP version 13
+# tst_Xunit
+ok 1 - initTestCase()
+# just a QWARN() !
+ok 2 - testFunc1()
+# a qDebug() call with comment-ending stuff -->
+not ok 3 - testFunc2()
+ ---
+ type: QCOMPARE
+ message: Compared values are not the same
+ wanted: 3 (3)
+ found: 2 (2)
+ expected: 3 (3)
+ actual: 2 (2)
+ at: tst_Xunit::testFunc2() (qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp:61)
+ file: qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp
+ line: 61
+ ...
+ok 4 - testFunc3() # SKIP skipping this function!
+not ok 5 - testFunc4()
+ ---
+ # a forced failure!
+ at: tst_Xunit::testFunc4() (qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp:71)
+ file: qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp
+ line: 71
+ ...
+not ok 6 - testFunc5() # TODO this failure is expected
+ ---
+ at: tst_Xunit::testFunc5() (qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp:85)
+ file: qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp
+ line: 85
+ ...
+not ok 7 - testFunc6() # TODO this failure is also expected
+ ---
+ at: tst_Xunit::testFunc6() (qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp:91)
+ file: qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp
+ line: 91
+ ...
+ok 8 - testFunc7() # TODO 'true' returned TRUE unexpectedly. ()
+ok 9 - cleanupTestCase()
+1..9
+# tests 9
+# pass 5
+# fail 3
diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py
index aa11ca4fe7..1996416e8c 100755
--- a/tests/auto/testlib/selftests/generate_expected_output.py
+++ b/tests/auto/testlib/selftests/generate_expected_output.py
@@ -37,9 +37,7 @@
# it to the output of each test, ignoring various boring changes.
# This script canonicalises the parts that would exhibit those boring
# changes, so as to avoid noise in git (and conflicts in merges) for
-# the saved copies of the output. If you add or remove any files, be
-# sure to update selftests.qrc to match; the selftest only sees files
-# listed there.
+# the saved copies of the output.
import os
import subprocess
@@ -116,10 +114,13 @@ class Cleaner (object):
raise Fail('Unable to find', command, 'in $PATH')
# Are we being run from the right place ?
- myNames = scriptPath.split(os.path.sep)
- if not (here.split(os.path.sep)[-5:] == myNames[-6:-1]
+ scriptPath, myName = os.path.split(scriptPath)
+ hereNames, depth = scriptPath.split(os.path.sep), 5
+ hereNames = hereNames[-depth:] # path components from qtbase down
+ assert hereNames[0] == 'qtbase', ('Script moved: please correct depth', hereNames)
+ if not (here.split(os.path.sep)[-depth:] == hereNames
and os.path.isfile(qmake)):
- raise Fail('Run', myNames[-1], 'in its directory of a completed build')
+ raise Fail('Run', myName, 'in its directory of a completed build')
try:
qtver = subprocess.check_output([qmake, '-query', 'QT_VERSION'])
@@ -127,8 +128,17 @@ class Cleaner (object):
raise Fail(what.strerror)
qtver = qtver.strip().decode('utf-8')
- scriptPath = os.path.dirname(scriptPath) # ditch leaf file-name
- sentinel = os.path.sep + 'qtbase' + os.path.sep # '/qtbase/'
+ hereNames = tuple(hereNames)
+ # Add path to specific sources and to tst_*.cpp if missing (for in-source builds):
+ patterns += ((r'(^|[^/])\b(qtestcase.cpp)\b', r'\1qtbase/src/testlib/\2'),
+ # Add more special cases here, if they show up !
+ (r'([[" ])\.\./(counting/tst_counting.cpp)\b',
+ r'\1' + os.path.sep.join(hereNames + (r'\2',))),
+ # The common pattern:
+ (r'(^|[^/])\b(tst_)?([a-z]+\d*)\.cpp\b',
+ r'\1' + os.path.sep.join(hereNames + (r'\3', r'\2\3.cpp'))))
+
+ sentinel = os.path.sep + hereNames[0] + os.path.sep # '/qtbase/'
# Identify the path prefix of our qtbase ancestor directory
# (source, build and $PWD, when different); trim such prefixes
# off all paths we see.
@@ -212,7 +222,7 @@ class Scanner (object):
del re
def generateTestData(testname, clean,
- formats = ('xml', 'txt', 'xunitxml', 'lightxml', 'teamcity'),
+ formats = ('xml', 'txt', 'xunitxml', 'lightxml', 'teamcity', 'tap'),
extraArgs = {
"commandlinedata": "fiveTablePasses fiveTablePasses:fiveTablePasses_data1 -v2",
"benchlibcallgrind": "-callgrind",
diff --git a/tests/auto/testlib/selftests/keyboard/keyboard.pro b/tests/auto/testlib/selftests/keyboard/keyboard.pro
new file mode 100644
index 0000000000..0097318797
--- /dev/null
+++ b/tests/auto/testlib/selftests/keyboard/keyboard.pro
@@ -0,0 +1,7 @@
+SOURCES += tst_keyboard.cpp
+QT += testlib testlib-private gui gui-private
+
+macos:CONFIG -= app_bundle
+CONFIG -= debug_and_release_target
+
+TARGET = keyboard
diff --git a/tests/auto/testlib/selftests/keyboard/tst_keyboard.cpp b/tests/auto/testlib/selftests/keyboard/tst_keyboard.cpp
new file mode 100644
index 0000000000..e185be8532
--- /dev/null
+++ b/tests/auto/testlib/selftests/keyboard/tst_keyboard.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/qtest.h>
+#include <QtGui/qwindow.h>
+
+class tst_Keyboard : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void keyPressAndRelease();
+};
+
+class KeyWindow : public QWindow
+{
+public:
+ void keyPressEvent(QKeyEvent *event) override
+ {
+ QSharedPointer<QKeyEvent> copiedEvent(new QKeyEvent(event->type(), event->key(),
+ event->modifiers(), event->text(), event->isAutoRepeat(), event->count()));
+ mEventOrder.append(copiedEvent);
+ }
+
+ void keyReleaseEvent(QKeyEvent *event) override
+ {
+ QSharedPointer<QKeyEvent> copiedEvent(new QKeyEvent(event->type(), event->key(),
+ event->modifiers(), event->text(), event->isAutoRepeat(), event->count()));
+ mEventOrder.append(copiedEvent);
+ }
+
+ QVector<QSharedPointer<QKeyEvent>> mEventOrder;
+};
+
+void tst_Keyboard::keyPressAndRelease()
+{
+ KeyWindow window;
+ window.show();
+ window.setGeometry(100, 100, 200, 200);
+ QVERIFY(QTest::qWaitForWindowExposed(&window));
+ QVERIFY(QTest::qWaitForWindowActive(&window));
+
+ QTest::keyPress(&window, Qt::Key_A);
+ QTest::keyRelease(&window, Qt::Key_A);
+ QCOMPARE(window.mEventOrder.size(), 2);
+
+ const auto pressEvent = window.mEventOrder.at(0);
+ QCOMPARE(pressEvent->type(), QEvent::KeyPress);
+ QCOMPARE(pressEvent->key(), Qt::Key_A);
+ QCOMPARE(pressEvent->modifiers(), Qt::NoModifier);
+ QCOMPARE(pressEvent->text(), "a");
+ QCOMPARE(pressEvent->isAutoRepeat(), false);
+
+ const auto releaseEvent = window.mEventOrder.at(1);
+ QCOMPARE(releaseEvent->type(), QEvent::KeyRelease);
+ QCOMPARE(releaseEvent->key(), Qt::Key_A);
+ QCOMPARE(releaseEvent->modifiers(), Qt::NoModifier);
+ QCOMPARE(releaseEvent->text(), "a");
+ QCOMPARE(releaseEvent->isAutoRepeat(), false);
+}
+
+QTEST_MAIN(tst_Keyboard)
+#include "tst_keyboard.moc"
diff --git a/tests/auto/testlib/selftests/selftests.pri b/tests/auto/testlib/selftests/selftests.pri
index 079f3f7959..498d1653c0 100644
--- a/tests/auto/testlib/selftests/selftests.pri
+++ b/tests/auto/testlib/selftests/selftests.pri
@@ -27,8 +27,10 @@ SUBPROGRAMS = \
findtestdata \
float \
globaldata \
+ keyboard \
longstring \
maxwarnings \
+ mouse \
multiexec \
pairdiagnostics \
printdatatags \
@@ -43,12 +45,12 @@ SUBPROGRAMS = \
sleep \
strcmp \
subtest \
+ tuplediagnostics \
verbose1 \
verbose2 \
verifyexceptionthrown \
warnings \
- xunit \
- mouse
+ xunit
INCLUDEPATH += ../../../../shared/
HEADERS += ../../../../shared/emulationdetector.h
diff --git a/tests/auto/testlib/selftests/selftests.qrc b/tests/auto/testlib/selftests/selftests.qrc
deleted file mode 100644
index 75d3375394..0000000000
--- a/tests/auto/testlib/selftests/selftests.qrc
+++ /dev/null
@@ -1,219 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>expected_assert.lightxml</file>
- <file>expected_assert.teamcity</file>
- <file>expected_assert.txt</file>
- <file>expected_assert.xml</file>
- <file>expected_assert.xunitxml</file>
- <file>expected_badxml.lightxml</file>
- <file>expected_badxml.teamcity</file>
- <file>expected_badxml.txt</file>
- <file>expected_badxml.xml</file>
- <file>expected_badxml.xunitxml</file>
- <file>expected_benchlibcallgrind_0.txt</file>
- <file>expected_benchlibcallgrind_1.txt</file>
- <file>expected_benchlibcallgrind.csv</file>
- <file>expected_benchlibcallgrind.lightxml</file>
- <file>expected_benchlibcallgrind.xml</file>
- <file>expected_benchlibcallgrind.xunitxml</file>
- <file>expected_benchlibcounting.csv</file>
- <file>expected_benchlibcounting.lightxml</file>
- <file>expected_benchlibcounting.txt</file>
- <file>expected_benchlibcounting.xml</file>
- <file>expected_benchlibcounting.xunitxml</file>
- <file>expected_benchlibeventcounter.csv</file>
- <file>expected_benchlibeventcounter.lightxml</file>
- <file>expected_benchlibeventcounter.txt</file>
- <file>expected_benchlibeventcounter.xml</file>
- <file>expected_benchlibeventcounter.xunitxml</file>
- <file>expected_benchliboptions.lightxml</file>
- <file>expected_benchliboptions.txt</file>
- <file>expected_benchliboptions.xml</file>
- <file>expected_benchliboptions.xunitxml</file>
- <file>expected_benchlibtickcounter.csv</file>
- <file>expected_benchlibtickcounter.lightxml</file>
- <file>expected_benchlibtickcounter.txt</file>
- <file>expected_benchlibtickcounter.xml</file>
- <file>expected_benchlibtickcounter.xunitxml</file>
- <file>expected_benchlibwalltime.csv</file>
- <file>expected_benchlibwalltime.lightxml</file>
- <file>expected_benchlibwalltime.txt</file>
- <file>expected_benchlibwalltime.xml</file>
- <file>expected_benchlibwalltime.xunitxml</file>
- <file>expected_blacklisted.lightxml</file>
- <file>expected_blacklisted.txt</file>
- <file>expected_blacklisted.xml</file>
- <file>expected_blacklisted.xunitxml</file>
- <file>expected_cmptest.lightxml</file>
- <file>expected_cmptest.teamcity</file>
- <file>expected_cmptest.txt</file>
- <file>expected_cmptest.xml</file>
- <file>expected_cmptest.xunitxml</file>
- <file>expected_commandlinedata.lightxml</file>
- <file>expected_commandlinedata.teamcity</file>
- <file>expected_commandlinedata.txt</file>
- <file>expected_commandlinedata.xml</file>
- <file>expected_commandlinedata.xunitxml</file>
- <file>expected_counting.lightxml</file>
- <file>expected_counting.teamcity</file>
- <file>expected_counting.txt</file>
- <file>expected_counting.xml</file>
- <file>expected_counting.xunitxml</file>
- <file>expected_crashes_1.txt</file>
- <file>expected_crashes_2.txt</file>
- <file>expected_crashes_3.txt</file>
- <file>expected_datatable.lightxml</file>
- <file>expected_datatable.teamcity</file>
- <file>expected_datatable.txt</file>
- <file>expected_datatable.xml</file>
- <file>expected_datatable.xunitxml</file>
- <file>expected_datetime.lightxml</file>
- <file>expected_datetime.teamcity</file>
- <file>expected_datetime.txt</file>
- <file>expected_datetime.xml</file>
- <file>expected_datetime.xunitxml</file>
- <file>expected_differentexec.lightxml</file>
- <file>expected_differentexec.txt</file>
- <file>expected_differentexec.xml</file>
- <file>expected_differentexec.xunitxml</file>
- <file>expected_exceptionthrow.lightxml</file>
- <file>expected_exceptionthrow.teamcity</file>
- <file>expected_exceptionthrow.txt</file>
- <file>expected_exceptionthrow.xml</file>
- <file>expected_exceptionthrow.xunitxml</file>
- <file>expected_expectfail.lightxml</file>
- <file>expected_expectfail.teamcity</file>
- <file>expected_expectfail.txt</file>
- <file>expected_expectfail.xml</file>
- <file>expected_expectfail.xunitxml</file>
- <file>expected_failcleanup.lightxml</file>
- <file>expected_failcleanup.teamcity</file>
- <file>expected_failcleanup.txt</file>
- <file>expected_failcleanup.xml</file>
- <file>expected_failcleanup.xunitxml</file>
- <file>expected_failinit.lightxml</file>
- <file>expected_failinit.teamcity</file>
- <file>expected_failinit.txt</file>
- <file>expected_failinit.xml</file>
- <file>expected_failinit.xunitxml</file>
- <file>expected_failinitdata.lightxml</file>
- <file>expected_failinitdata.teamcity</file>
- <file>expected_failinitdata.txt</file>
- <file>expected_failinitdata.xml</file>
- <file>expected_failinitdata.xunitxml</file>
- <file>expected_fetchbogus.lightxml</file>
- <file>expected_fetchbogus.teamcity</file>
- <file>expected_fetchbogus.txt</file>
- <file>expected_fetchbogus.xml</file>
- <file>expected_fetchbogus.xunitxml</file>
- <file>expected_findtestdata.lightxml</file>
- <file>expected_findtestdata.teamcity</file>
- <file>expected_findtestdata.txt</file>
- <file>expected_findtestdata.xml</file>
- <file>expected_findtestdata.xunitxml</file>
- <file>expected_float.lightxml</file>
- <file>expected_float.txt</file>
- <file>expected_float.xml</file>
- <file>expected_float.xunitxml</file>
- <file>expected_globaldata.lightxml</file>
- <file>expected_globaldata.teamcity</file>
- <file>expected_globaldata.txt</file>
- <file>expected_globaldata.xml</file>
- <file>expected_globaldata.xunitxml</file>
- <file>expected_longstring.lightxml</file>
- <file>expected_longstring.teamcity</file>
- <file>expected_longstring.txt</file>
- <file>expected_longstring.xml</file>
- <file>expected_longstring.xunitxml</file>
- <file>expected_maxwarnings.lightxml</file>
- <file>expected_maxwarnings.teamcity</file>
- <file>expected_maxwarnings.txt</file>
- <file>expected_maxwarnings.xml</file>
- <file>expected_maxwarnings.xunitxml</file>
- <file>expected_multiexec.lightxml</file>
- <file>expected_multiexec.txt</file>
- <file>expected_multiexec.xml</file>
- <file>expected_multiexec.xunitxml</file>
- <file>expected_pairdiagnostics.lightxml</file>
- <file>expected_pairdiagnostics.teamcity</file>
- <file>expected_pairdiagnostics.txt</file>
- <file>expected_pairdiagnostics.xml</file>
- <file>expected_pairdiagnostics.xunitxml</file>
- <file>expected_printdatatags.txt</file>
- <file>expected_printdatatagswithglobaltags.txt</file>
- <file>expected_qexecstringlist.lightxml</file>
- <file>expected_qexecstringlist.txt</file>
- <file>expected_qexecstringlist.xml</file>
- <file>expected_qexecstringlist.xunitxml</file>
- <file>expected_silent.lightxml</file>
- <file>expected_silent.teamcity</file>
- <file>expected_silent.txt</file>
- <file>expected_silent.xml</file>
- <file>expected_silent.xunitxml</file>
- <file>expected_singleskip.lightxml</file>
- <file>expected_singleskip.teamcity</file>
- <file>expected_singleskip.txt</file>
- <file>expected_singleskip.xml</file>
- <file>expected_singleskip.xunitxml</file>
- <file>expected_skip.lightxml</file>
- <file>expected_skip.teamcity</file>
- <file>expected_skip.txt</file>
- <file>expected_skip.xml</file>
- <file>expected_skip.xunitxml</file>
- <file>expected_skipcleanup.lightxml</file>
- <file>expected_skipcleanup.teamcity</file>
- <file>expected_skipcleanup.txt</file>
- <file>expected_skipcleanup.xml</file>
- <file>expected_skipcleanup.xunitxml</file>
- <file>expected_skipinit.lightxml</file>
- <file>expected_skipinit.txt</file>
- <file>expected_skipinit.teamcity</file>
- <file>expected_skipinit.xml</file>
- <file>expected_skipinit.xunitxml</file>
- <file>expected_skipinitdata.lightxml</file>
- <file>expected_skipinitdata.teamcity</file>
- <file>expected_skipinitdata.txt</file>
- <file>expected_skipinitdata.xml</file>
- <file>expected_skipinitdata.xunitxml</file>
- <file>expected_sleep.lightxml</file>
- <file>expected_sleep.teamcity</file>
- <file>expected_sleep.txt</file>
- <file>expected_sleep.xml</file>
- <file>expected_sleep.xunitxml</file>
- <file>expected_strcmp.lightxml</file>
- <file>expected_strcmp.teamcity</file>
- <file>expected_strcmp.txt</file>
- <file>expected_strcmp.xml</file>
- <file>expected_strcmp.xunitxml</file>
- <file>expected_subtest.lightxml</file>
- <file>expected_subtest.txt</file>
- <file>expected_subtest.teamcity</file>
- <file>expected_subtest.xml</file>
- <file>expected_subtest.xunitxml</file>
- <file>expected_verbose1.lightxml</file>
- <file>expected_verbose1.teamcity</file>
- <file>expected_verbose1.txt</file>
- <file>expected_verbose1.xml</file>
- <file>expected_verbose1.xunitxml</file>
- <file>expected_verbose2.lightxml</file>
- <file>expected_verbose2.teamcity</file>
- <file>expected_verbose2.txt</file>
- <file>expected_verbose2.xml</file>
- <file>expected_verbose2.xunitxml</file>
- <file>expected_verifyexceptionthrown.lightxml</file>
- <file>expected_verifyexceptionthrown.teamcity</file>
- <file>expected_verifyexceptionthrown.txt</file>
- <file>expected_verifyexceptionthrown.xml</file>
- <file>expected_verifyexceptionthrown.xunitxml</file>
- <file>expected_warnings.lightxml</file>
- <file>expected_warnings.teamcity</file>
- <file>expected_warnings.txt</file>
- <file>expected_warnings.xml</file>
- <file>expected_warnings.xunitxml</file>
- <file>expected_xunit.lightxml</file>
- <file>expected_xunit.teamcity</file>
- <file>expected_xunit.txt</file>
- <file>expected_xunit.xml</file>
- <file>expected_xunit.xunitxml</file>
- </qresource>
-</RCC>
diff --git a/tests/auto/testlib/selftests/test/test.pro b/tests/auto/testlib/selftests/test/test.pro
index bd2366f3e8..ec1633ebff 100644
--- a/tests/auto/testlib/selftests/test/test.pro
+++ b/tests/auto/testlib/selftests/test/test.pro
@@ -12,7 +12,9 @@ win32 {
}
}
-RESOURCES += ../selftests.qrc
+expected_files.files = $$files($$PWD/../expected_*)
+expected_files.base = $$PWD/..
+RESOURCES += expected_files
include(../selftests.pri)
!android:!winrt: for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../$${file}/$${file}"
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index 63e5721e7e..c5f847562e 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -62,11 +62,22 @@ private slots:
private:
void doRunSubTest(QString const& subdir, QStringList const& loggers, QStringList const& arguments, bool crashes);
+ bool compareOutput(const QString &logger, const QString &subdir,
+ const QByteArray &rawOutput, const QByteArrayList &actual,
+ const QByteArrayList &expected,
+ QString *errorMessage) const;
+ bool compareLine(const QString &logger, const QString &subdir, bool benchmark,
+ const QString &actualLine, const QString &expLine,
+ QString *errorMessage) const;
+ bool checkXml(const QString &logger, QByteArray rawOutput,
+ QString *errorMessage) const;
+
QString logName(const QString &logger) const;
QList<LoggerSet> allLoggerSets() const;
QTemporaryDir tempDir;
QRegularExpression durationRegExp;
+ QRegularExpression teamcityLocRegExp;
};
struct BenchmarkResult
@@ -81,46 +92,50 @@ struct BenchmarkResult
static BenchmarkResult parse(QString const&, QString*);
};
-QT_BEGIN_NAMESPACE
-namespace QTest
+static QString msgMismatch(const QString &actual, const QString &expected)
{
-template <>
-inline bool qCompare
- (BenchmarkResult const &r1, BenchmarkResult const &r2,
- const char* actual, const char* expected, const char* file, int line)
+ return QLatin1String("Mismatch:\n'") + actual + QLatin1String("'\n !=\n'")
+ + expected + QLatin1Char('\'');
+}
+
+static bool compareBenchmarkResult(BenchmarkResult const &r1, BenchmarkResult const &r2,
+ QString *errorMessage)
{
// First make sure the iterations and unit match.
if (r1.iterations != r2.iterations || r1.unit != r2.unit) {
// Nope - compare whole string for best failure message
- return qCompare(r1.toString(), r2.toString(), actual, expected, file, line);
+ *errorMessage = msgMismatch(r1.toString(), r2.toString());
+ return false;
}
// Now check the value. Some variance is allowed, and how much depends on
// the measured unit.
qreal variance = 0.;
- if (r1.unit == "msecs" || r1.unit == "WalltimeMilliseconds") {
+ if (r1.unit == QLatin1String("msecs") || r1.unit == QLatin1String("WalltimeMilliseconds"))
variance = 0.1;
- }
- else if (r1.unit == "instruction reads") {
+ else if (r1.unit == QLatin1String("instruction reads"))
variance = 0.001;
- }
- else if (r1.unit == "CPU ticks" || r1.unit == "CPUTicks") {
+ else if (r1.unit == QLatin1String("CPU ticks") || r1.unit == QLatin1String("CPUTicks"))
variance = 0.001;
- }
+
if (variance == 0.) {
// No variance allowed - compare whole string
- return qCompare(r1.toString(), r2.toString(), actual, expected, file, line);
+ const QString r1S = r1.toString();
+ const QString r2S = r2.toString();
+ if (r1S != r2S) {
+ *errorMessage = msgMismatch(r1S, r2S);
+ return false;
+ }
+ return true;
}
- if (qAbs(qreal(r1.total) - qreal(r2.total)) <= qreal(r1.total)*variance) {
- return compare_helper(true, 0, 0, 0, actual, expected, file, line);
+ if (qAbs(qreal(r1.total) - qreal(r2.total)) > qreal(r1.total) * variance) {
+ // Whoops, didn't match. Compare the whole string for the most useful failure message.
+ *errorMessage = msgMismatch(r1.toString(), r2.toString());
+ return false;
}
-
- // Whoops, didn't match. Compare the whole string for the most useful failure message.
- return qCompare(r1.toString(), r2.toString(), actual, expected, file, line);
-}
+ return true;
}
-QT_END_NAMESPACE
// Split the passed block of text into an array of lines, replacing any
// filenames and line numbers with generic markers to avoid failing the test
@@ -227,26 +242,6 @@ static QByteArray runDiff(const QByteArrayList &expected, const QByteArrayList &
return result;
}
-// Print the difference preferably using 'diff', else just print lines
-static void printDifference(const QByteArrayList &expected, const QByteArrayList &actual)
-{
- QDebug info = qInfo();
- info.noquote();
- info.nospace();
- const QByteArray diff = runDiff(expected, actual);
- if (diff.isEmpty()) {
- info << "<<<<<<\n";
- for (const QByteArray &line : actual)
- info << line << '\n';
- info << "======\n";
- for (const QByteArray &line : expected)
- info << line << '\n';
- info << ">>>>>>\n";
- } else {
- info << diff;
- }
-}
-
// Each test is run with a set of one or more test output loggers.
// This struct holds information about one such test.
struct LoggerSet
@@ -315,6 +310,14 @@ QList<LoggerSet> tst_Selftests::allLoggerSets() const
QStringList() << "teamcity",
QStringList() << "-teamcity" << "-o" << logName("teamcity")
)
+ << LoggerSet("old stdout tap",
+ QStringList() << "stdout tap",
+ QStringList() << "-tap"
+ )
+ << LoggerSet("old tap",
+ QStringList() << "tap",
+ QStringList() << "-tap" << "-o" << logName("tap")
+ )
// Test with new-style options for a single logger
<< LoggerSet("new stdout txt",
QStringList() << "stdout txt",
@@ -362,6 +365,14 @@ QList<LoggerSet> tst_Selftests::allLoggerSets() const
QStringList() << "teamcity",
QStringList() << "-o" << logName("teamcity")+",teamcity"
)
+ << LoggerSet("new stdout tap",
+ QStringList() << "stdout tap",
+ QStringList() << "-o" << "-,tap"
+ )
+ << LoggerSet("new tap",
+ QStringList() << "tap",
+ QStringList() << "-o" << logName("tap")+",tap"
+ )
// Test with two loggers (don't test all 32 combinations, just a sample)
<< LoggerSet("stdout txt + txt",
QStringList() << "stdout txt" << "txt",
@@ -385,13 +396,14 @@ QList<LoggerSet> tst_Selftests::allLoggerSets() const
)
// All loggers at the same time (except csv)
<< LoggerSet("all loggers",
- QStringList() << "txt" << "xml" << "lightxml" << "stdout txt" << "xunitxml",
+ QStringList() << "txt" << "xml" << "lightxml" << "stdout txt" << "xunitxml" << "tap",
QStringList() << "-o" << logName("txt")+",txt"
<< "-o" << logName("xml")+",xml"
<< "-o" << logName("lightxml")+",lightxml"
<< "-o" << "-,txt"
<< "-o" << logName("xunitxml")+",xunitxml"
<< "-o" << logName("teamcity")+",teamcity"
+ << "-o" << logName("tap")+",tap"
)
;
}
@@ -399,6 +411,7 @@ QList<LoggerSet> tst_Selftests::allLoggerSets() const
tst_Selftests::tst_Selftests()
: tempDir(QDir::tempPath() + "/tst_selftests.XXXXXX")
, durationRegExp("<Duration msecs=\"[\\d\\.]+\"/>")
+ , teamcityLocRegExp("\\|\\[Loc: .*\\(\\d*\\)\\|\\]")
{}
void tst_Selftests::initTestCase()
@@ -464,6 +477,7 @@ void tst_Selftests::runSubTest_data()
<< "findtestdata"
<< "float"
<< "globaldata"
+ << "keyboard"
<< "longstring"
<< "maxwarnings"
<< "multiexec"
@@ -480,6 +494,7 @@ void tst_Selftests::runSubTest_data()
<< "sleep"
<< "strcmp"
<< "subtest"
+ << "tuplediagnostics"
<< "verbose1"
<< "verbose2"
#ifndef QT_NO_EXCEPTIONS
@@ -760,147 +775,203 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
}
QList<QByteArray> res = splitLines(actualOutputs[n]);
- const QString expectedFileName = expectedFileNameFromTest(subdir, logger);
- QList<QByteArray> exp = expectedResult(expectedFileName);
+ QString errorMessage;
+ QString expectedFileName = expectedFileNameFromTest(subdir, logger);
+ QByteArrayList exp = expectedResult(expectedFileName);
+ if (!exp.isEmpty()) {
#ifdef Q_CC_MINGW
- // MinGW formats double numbers differently
- if (n == 0 && subdir == QStringLiteral("float")) {
- for (int i = 0; i < exp.size(); ++i) {
- exp[i].replace("e-07", "e-007");
- exp[i].replace("e+07", "e+007");
- }
- }
-#endif
-
- // For the "crashes" test, there are multiple versions of the
- // expected output. Load the one with the same line count as
- // the actual output.
- if (exp.count() == 0) {
- QList<QList<QByteArray> > expArr;
- QList<QByteArray> tmp;
- int i = 1;
- do {
- tmp = expectedResult(expectedFileNameFromTest(subdir + QLatin1Char('_') + QString::number(i++), logger));
- if (tmp.count())
- expArr += tmp;
- } while (tmp.count());
-
- for (int j = 0; j < expArr.count(); ++j) {
- if (res.count() == expArr.at(j).count()) {
- exp = expArr.at(j);
- break;
+ // MinGW formats double numbers differently (last verified with 7.1)
+ if (n == 0 && subdir == QStringLiteral("float")) {
+ for (int i = 0; i < exp.size(); ++i) {
+ exp[i].replace("e-07", "e-007");
+ exp[i].replace("e+07", "e+007");
}
}
-
- if (expArr.count()) {
- QVERIFY2(exp.count(),
- qPrintable(QString::fromLatin1("None of the expected output files for "
- "%1 format has matching line count.")
- .arg(loggers.at(n))));
+#endif
+ if (!compareOutput(logger, subdir, actualOutputs[n], res, exp, &errorMessage)) {
+ errorMessage.prepend(QLatin1Char('"') + logger + QLatin1String("\", ")
+ + expectedFileName + QLatin1Char(' '));
+ errorMessage += QLatin1String("\nActual:\n") + QLatin1String(actualOutputs[n]);
+ const QByteArray diff = runDiff(exp, res);
+ if (!diff.isEmpty())
+ errorMessage += QLatin1String("\nDiff:\n") + QLatin1String(diff);
+ QFAIL(qPrintable(errorMessage));
}
} else {
- if (res.count() != exp.count()) {
- printDifference(exp, res);
- QVERIFY2(res.count() == exp.count(),
- qPrintable(QString::fromLatin1("Mismatch in line count: %1 != %2 (%3, %4).")
- .arg(res.count()).arg(exp.count()).arg(loggers.at(n), expectedFileName)));
+ // For the "crashes" and other tests, there are multiple versions of the
+ // expected output. Loop until a matching one is found.
+ bool ok = false;
+ for (int i = 1; !ok; ++i) {
+ expectedFileName = expectedFileNameFromTest(subdir + QLatin1Char('_') + QString::number(i), logger);
+ const QByteArrayList exp = expectedResult(expectedFileName);
+ if (exp.isEmpty())
+ break;
+ QString errorMessage2;
+ ok = compareOutput(logger, subdir, actualOutputs[n], res, exp, &errorMessage2);
+ if (!ok)
+ errorMessage += QLatin1Char('\n') + expectedFileName + QLatin1String(": ") + errorMessage2;
+ }
+ if (!ok) { // Use QDebug's quote mechanism to report potentially garbled output.
+ errorMessage.prepend(QLatin1String("Cannot find a matching file for ") + subdir);
+ errorMessage += QLatin1String("\nActual:\n");
+ QDebug(&errorMessage) << actualOutputs[n];
+ QFAIL(qPrintable(errorMessage));
}
}
+ }
+}
- // By this point, we should have loaded a non-empty expected data file.
- QVERIFY2(exp.count(),
- qPrintable(QString::fromLatin1("Expected test data for %1 format is empty or not found.")
- .arg(loggers.at(n))));
-
- // For xml output formats, verify that the log is valid XML.
- if (logFormat(logger) == "xunitxml" || logFormat(logger) == "xml" || logFormat(logger) == "lightxml") {
- QByteArray xml(actualOutputs[n]);
- // lightxml intentionally skips the root element, which technically makes it
- // not valid XML.
- // We'll add that ourselves for the purpose of validation.
- if (logFormat(logger) == "lightxml") {
- xml.prepend("<root>");
- xml.append("</root>");
- }
+static QString teamCityLocation() { return QStringLiteral("|[Loc: _FILE_(_LINE_)|]"); }
+static QString qtVersionPlaceHolder() { return QStringLiteral("@INSERT_QT_VERSION_HERE@"); }
- QXmlStreamReader reader(xml);
+bool tst_Selftests::compareOutput(const QString &logger, const QString &subdir,
+ const QByteArray &rawOutput, const QByteArrayList &actual,
+ const QByteArrayList &expected,
+ QString *errorMessage) const
+{
- while (!reader.atEnd())
- reader.readNext();
+ if (actual.size() != expected.size()) {
+ *errorMessage = QString::fromLatin1("Mismatch in line count: %1 != %2.")
+ .arg(actual.size()).arg(expected.size());
+ return false;
+ }
- QVERIFY2(!reader.error(), qPrintable(QString("line %1, col %2: %3")
- .arg(reader.lineNumber())
- .arg(reader.columnNumber())
- .arg(reader.errorString())
- ));
+ // For xml output formats, verify that the log is valid XML.
+ if (logger.endsWith(QLatin1String("xml")) && !checkXml(logger, rawOutput, errorMessage))
+ return false;
+
+ // Verify that the actual output is an acceptable match for the
+ // expected output.
+
+ const QString qtVersion = QLatin1String(QT_VERSION_STR);
+ bool benchmark = false;
+ for (int i = 0, size = actual.size(); i < size; ++i) {
+ const QByteArray &actualLineBA = actual.at(i);
+ // the __FILE__ __LINE__ output is compiler dependent, skip it
+ if (actualLineBA.startsWith(" Loc: [") && actualLineBA.endsWith(")]"))
+ continue;
+ if (actualLineBA.endsWith(" : failure location"))
+ continue;
+
+ if (actualLineBA.startsWith("Config: Using QtTest library") // Text build string
+ || actualLineBA.startsWith(" <QtBuild") // XML, Light XML build string
+ || (actualLineBA.startsWith(" <property value=") && actualLineBA.endsWith("name=\"QtBuild\"/>"))) { // XUNIT-XML build string
+ continue;
}
- // Verify that the actual output is an acceptable match for the
- // expected output.
- bool benchmark = false;
- for (int i = 0; i < res.count(); ++i) {
- QByteArray line = res.at(i);
- // the __FILE__ __LINE__ output is compiler dependent, skip it
- if (line.startsWith(" Loc: [") && line.endsWith(")]"))
- continue;
- if (line.endsWith(" : failure location"))
- continue;
+ QString actualLine = QString::fromLatin1(actualLineBA);
+ QString expectedLine = QString::fromLatin1(expected.at(i));
+ expectedLine.replace(qtVersionPlaceHolder(), qtVersion);
- if (line.startsWith("Config: Using QtTest library") // Text build string
- || line.startsWith(" <QtBuild") // XML, Light XML build string
- || (line.startsWith(" <property value=") && line.endsWith("name=\"QtBuild\"/>"))) { // XUNIT-XML build string
- continue;
- }
+ // Special handling for ignoring _FILE_ and _LINE_ if logger is teamcity
+ if (logger.endsWith(QLatin1String("teamcity"))) {
+ actualLine.replace(teamcityLocRegExp, teamCityLocation());
+ expectedLine.replace(teamcityLocRegExp, teamCityLocation());
+ }
- QByteArray expLine = exp.at(i);
+ if (logger.endsWith(QLatin1String("tap"))) {
+ if (expectedLine.contains(QLatin1String("at:"))
+ || expectedLine.contains(QLatin1String("file:"))
+ || expectedLine.contains(QLatin1String("line:")))
+ actualLine = expectedLine;
+ }
- // Special handling for ignoring _FILE_ and _LINE_ if logger is teamcity
- if (logFormat(logger) == "teamcity") {
- QRegularExpression teamcityLocRegExp("\\|\\[Loc: .*\\(\\d*\\)\\|\\]");
- line = QString(line).replace(teamcityLocRegExp, "|[Loc: _FILE_(_LINE_)|]").toLatin1();
- expLine = QString(expLine).replace(teamcityLocRegExp, "|[Loc: _FILE_(_LINE_)|]").toLatin1();
- }
+ if (!compareLine(logger, subdir, benchmark, actualLine,
+ expectedLine, errorMessage)) {
+ errorMessage->prepend(QLatin1String("Line ") + QString::number(i + 1)
+ + QLatin1String(": "));
+ return false;
+ }
- const QString output(QString::fromLatin1(line));
- const QString expected(QString::fromLatin1(expLine).replace("@INSERT_QT_VERSION_HERE@", QT_VERSION_STR));
+ benchmark = actualLineBA.startsWith("RESULT : ");
+ }
+ return true;
+}
- if (subdir == "assert" && output.contains("ASSERT: ") && expected.contains("ASSERT: ") && output != expected)
- // Q_ASSERT uses __FILE__, the exact contents of which are
- // undefined. If we something that looks like a Q_ASSERT and we
- // were expecting to see a Q_ASSERT, we'll skip the line.
- continue;
- else if (expected.startsWith(QLatin1String("FAIL! : tst_Exception::throwException() Caught unhandled exce")) && expected != output)
- // On some platforms we compile without RTTI, and as a result we never throw an exception.
- QCOMPARE(output.simplified(), QString::fromLatin1("tst_Exception::throwException()").simplified());
- else if (benchmark || line.startsWith("<BenchmarkResult") || (logFormat(logger) == "csv" && line.startsWith('"'))) {
- // Don't do a literal comparison for benchmark results, since
- // results have some natural variance.
- QString error;
-
- BenchmarkResult actualResult = BenchmarkResult::parse(output, &error);
- QVERIFY2(error.isEmpty(), qPrintable(QString("Actual line didn't parse as benchmark result: %1\nLine: %2").arg(error).arg(output)));
-
- BenchmarkResult expectedResult = BenchmarkResult::parse(expected, &error);
- QVERIFY2(error.isEmpty(), qPrintable(QString("Expected line didn't parse as benchmark result: %1\nLine: %2").arg(error).arg(expected)));
-
- QCOMPARE(actualResult, expectedResult);
- } else if (line.startsWith(" <Duration msecs=") || line.startsWith("<Duration msecs=")) {
- QRegularExpressionMatch match = durationRegExp.match(line);
- QVERIFY2(match.hasMatch(), qPrintable(QString::fromLatin1("Invalid Duration tag at line %1 (%2): '%3'")
- .arg(i).arg(loggers.at(n), output)));
- } else if (line.startsWith("Totals:")) {
- const int lastCommaPos = line.lastIndexOf(',');
- if (lastCommaPos > 0)
- line.truncate(lastCommaPos); // Plain text logger: strip time (", 2323dms").
- } else {
- QVERIFY2(output == expected,
- qPrintable(QString::fromLatin1("Mismatch at line %1 (%2, %3):\n'%4'\n !=\n'%5'")
- .arg(i + 1).arg(loggers.at(n), expectedFileName, output, expected)));
- }
+bool tst_Selftests::compareLine(const QString &logger, const QString &subdir,
+ bool benchmark,
+ const QString &actualLine, const QString &expectedLine,
+ QString *errorMessage) const
+{
+ if (subdir == QLatin1String("assert") && actualLine.contains(QLatin1String("ASSERT: "))
+ && expectedLine.contains(QLatin1String("ASSERT: ")) && actualLine != expectedLine) {
+ // Q_ASSERT uses __FILE__, the exact contents of which are
+ // undefined. If have we something that looks like a Q_ASSERT and we
+ // were expecting to see a Q_ASSERT, we'll skip the line.
+ return true;
+ }
- benchmark = line.startsWith("RESULT : ");
+ if (expectedLine.startsWith(QLatin1String("FAIL! : tst_Exception::throwException() Caught unhandled exce"))
+ && actualLine != expectedLine) {
+ // On some platforms we compile without RTTI, and as a result we never throw an exception
+ if (actualLine.simplified() != QLatin1String("tst_Exception::throwException()")) {
+ *errorMessage = QString::fromLatin1("'%1' != 'tst_Exception::throwException()'").arg(actualLine);
+ return false;
}
+ return true;
+ }
+
+ if (benchmark || actualLine.startsWith(QLatin1String("<BenchmarkResult"))
+ || (logger == QLatin1String("csv") && actualLine.startsWith(QLatin1Char('"')))) {
+ // Don't do a literal comparison for benchmark results, since
+ // results have some natural variance.
+ QString error;
+ BenchmarkResult actualResult = BenchmarkResult::parse(actualLine, &error);
+ if (!error.isEmpty()) {
+ *errorMessage = QString::fromLatin1("Actual line didn't parse as benchmark result: %1\nLine: %2").arg(error, actualLine);
+ return false;
+ }
+ BenchmarkResult expectedResult = BenchmarkResult::parse(expectedLine, &error);
+ if (!error.isEmpty()) {
+ *errorMessage = QString::fromLatin1("Expected line didn't parse as benchmark result: %1\nLine: %2").arg(error, expectedLine);
+ return false;
+ }
+ return compareBenchmarkResult(actualResult, expectedResult, errorMessage);
+ }
+
+ if (actualLine.startsWith(QLatin1String(" <Duration msecs="))
+ || actualLine.startsWith(QLatin1String("<Duration msecs="))) {
+ QRegularExpressionMatch match = durationRegExp.match(actualLine);
+ if (match.hasMatch())
+ return true;
+ *errorMessage = QString::fromLatin1("Invalid Duration tag: '%1'").arg(actualLine);
+ return false;
+ }
+
+ if (actualLine.startsWith(QLatin1String("Totals:")) && expectedLine.startsWith(QLatin1String("Totals:")))
+ return true;
+
+ if (actualLine == expectedLine)
+ return true;
+
+ *errorMessage = msgMismatch(actualLine, expectedLine);
+ return false;
+}
+
+bool tst_Selftests::checkXml(const QString &logger, QByteArray xml,
+ QString *errorMessage) const
+{
+ // lightxml intentionally skips the root element, which technically makes it
+ // not valid XML.
+ // We'll add that ourselves for the purpose of validation.
+ if (logger.endsWith(QLatin1String("lightxml"))) {
+ xml.prepend("<root>");
+ xml.append("</root>");
+ }
+
+ QXmlStreamReader reader(xml);
+ while (!reader.atEnd())
+ reader.readNext();
+
+ if (reader.hasError()) {
+ const int lineNumber = int(reader.lineNumber());
+ const QByteArray line = xml.split('\n').value(lineNumber - 1);
+ *errorMessage = QString::fromLatin1("line %1, col %2 '%3': %4")
+ .arg(lineNumber).arg(reader.columnNumber())
+ .arg(QString::fromLatin1(line), reader.errorString());
+ return false;
}
+ return true;
}
#endif // QT_CONFIG(process)
diff --git a/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp b/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp
new file mode 100644
index 0000000000..17da52eaba
--- /dev/null
+++ b/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Samuel Gaist <samuel.gaist@edeltech.ch>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// Make sure we get a real Q_ASSERT even in release builds
+#ifdef QT_NO_DEBUG
+# undef QT_NO_DEBUG
+#endif
+
+#include <QtTest/QtTest>
+
+class tst_TupleDiagnostics: public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void testEmptyTuple() const;
+ void testSimpleTuple() const;
+ void testTuple() const;
+};
+
+void tst_TupleDiagnostics::testEmptyTuple() const
+{
+ QCOMPARE(std::tuple<>{}, std::tuple<>{});
+}
+
+void tst_TupleDiagnostics::testSimpleTuple() const
+{
+ QCOMPARE(std::tuple<int>{1}, std::tuple<int>{2});
+}
+
+void tst_TupleDiagnostics::testTuple() const
+{
+ std::tuple<int, char, QString> tuple1{42, 'Y', QStringLiteral("tuple1")};
+ std::tuple<int, char, QString> tuple2{42, 'Y', QStringLiteral("tuple2")};
+ QCOMPARE(tuple1, tuple2);
+}
+
+QTEST_MAIN(tst_TupleDiagnostics)
+
+#include "tst_tuplediagnostics.moc"
diff --git a/tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro b/tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro
new file mode 100644
index 0000000000..7a29e0e5e1
--- /dev/null
+++ b/tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro
@@ -0,0 +1,6 @@
+SOURCES += tst_tuplediagnostics.cpp
+QT = core testlib
+
+CONFIG -= app_bundle debug_and_release_target
+
+TARGET = tuplediagnostics