summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/testlib')
-rw-r--r--tests/auto/testlib/outformat/outformat.pro7
-rw-r--r--tests/auto/testlib/outformat/tst_outformat.cpp71
-rw-r--r--tests/auto/testlib/qabstractitemmodeltester/qabstractitemmodeltester.pro2
-rw-r--r--tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp4
-rw-r--r--tests/auto/testlib/qsignalspy/qsignalspy.pro2
-rw-r--r--tests/auto/testlib/selftests/alive/alive.pro2
-rw-r--r--tests/auto/testlib/selftests/assert/assert.pro2
-rw-r--r--tests/auto/testlib/selftests/badxml/badxml.pro2
-rw-r--r--tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro2
-rw-r--r--tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp4
-rw-r--r--tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro2
-rw-r--r--tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro2
-rw-r--r--tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro2
-rw-r--r--tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro2
-rw-r--r--tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro2
-rw-r--r--tests/auto/testlib/selftests/blacklisted/BLACKLIST14
-rw-r--r--tests/auto/testlib/selftests/blacklisted/blacklisted.pro2
-rw-r--r--tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp3
-rw-r--r--tests/auto/testlib/selftests/cmptest/cmptest.pro2
-rw-r--r--tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro2
-rw-r--r--tests/auto/testlib/selftests/counting/counting.pro2
-rw-r--r--tests/auto/testlib/selftests/crashes/crashes.pro2
-rw-r--r--tests/auto/testlib/selftests/datatable/datatable.pro2
-rw-r--r--tests/auto/testlib/selftests/datetime/datetime.pro2
-rw-r--r--tests/auto/testlib/selftests/deleteLater/deleteLater.pro2
-rw-r--r--tests/auto/testlib/selftests/deleteLater_noApp/deleteLater_noApp.pro2
-rw-r--r--tests/auto/testlib/selftests/differentexec/differentexec.pro2
-rw-r--r--tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro2
-rw-r--r--tests/auto/testlib/selftests/expected_blacklisted.tap8
-rw-r--r--tests/auto/testlib/selftests/expected_faildatatype.lightxml22
-rw-r--r--tests/auto/testlib/selftests/expected_faildatatype.tap16
-rw-r--r--tests/auto/testlib/selftests/expected_faildatatype.teamcity8
-rw-r--r--tests/auto/testlib/selftests/expected_faildatatype.txt9
-rw-r--r--tests/auto/testlib/selftests/expected_faildatatype.xml25
-rw-r--r--tests/auto/testlib/selftests/expected_faildatatype.xunitxml18
-rw-r--r--tests/auto/testlib/selftests/expected_failfetchtype.lightxml21
-rw-r--r--tests/auto/testlib/selftests/expected_failfetchtype.tap15
-rw-r--r--tests/auto/testlib/selftests/expected_failfetchtype.teamcity8
-rw-r--r--tests/auto/testlib/selftests/expected_failfetchtype.txt8
-rw-r--r--tests/auto/testlib/selftests/expected_failfetchtype.xml24
-rw-r--r--tests/auto/testlib/selftests/expected_failfetchtype.xunitxml16
-rw-r--r--tests/auto/testlib/selftests/expected_float.lightxml27
-rw-r--r--tests/auto/testlib/selftests/expected_float.tap314
-rw-r--r--tests/auto/testlib/selftests/expected_float.teamcity13
-rw-r--r--tests/auto/testlib/selftests/expected_float.txt16
-rw-r--r--tests/auto/testlib/selftests/expected_float.xml27
-rw-r--r--tests/auto/testlib/selftests/expected_float.xunitxml13
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.lightxml45
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.tap22
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.teamcity23
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.txt15
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.xml48
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.xunitxml16
-rw-r--r--tests/auto/testlib/selftests/expected_watchdog.lightxml19
-rw-r--r--tests/auto/testlib/selftests/expected_watchdog.tap15
-rw-r--r--tests/auto/testlib/selftests/expected_watchdog.teamcity8
-rw-r--r--tests/auto/testlib/selftests/expected_watchdog.txt8
-rw-r--r--tests/auto/testlib/selftests/expected_watchdog.xml22
-rw-r--r--tests/auto/testlib/selftests/expected_watchdog.xunitxml16
-rw-r--r--tests/auto/testlib/selftests/expectfail/expectfail.pro2
-rw-r--r--tests/auto/testlib/selftests/failcleanup/failcleanup.pro2
-rw-r--r--tests/auto/testlib/selftests/faildatatype/BLACKLIST4
-rw-r--r--tests/auto/testlib/selftests/faildatatype/faildatatype.pro9
-rw-r--r--tests/auto/testlib/selftests/faildatatype/tst_faildatatype.cpp57
-rw-r--r--tests/auto/testlib/selftests/failfetchtype/BLACKLIST4
-rw-r--r--tests/auto/testlib/selftests/failfetchtype/failfetchtype.pro9
-rw-r--r--tests/auto/testlib/selftests/failfetchtype/tst_failfetchtype.cpp55
-rw-r--r--tests/auto/testlib/selftests/failinit/failinit.pro2
-rw-r--r--tests/auto/testlib/selftests/failinitdata/failinitdata.pro2
-rw-r--r--tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro2
-rw-r--r--tests/auto/testlib/selftests/findtestdata/findtestdata.pro2
-rw-r--r--tests/auto/testlib/selftests/float/float.pro2
-rw-r--r--tests/auto/testlib/selftests/float/tst_float.cpp39
-rwxr-xr-xtests/auto/testlib/selftests/generate_expected_output.py76
-rw-r--r--tests/auto/testlib/selftests/globaldata/globaldata.pro2
-rw-r--r--tests/auto/testlib/selftests/keyboard/keyboard.pro2
-rw-r--r--tests/auto/testlib/selftests/longstring/longstring.pro2
-rw-r--r--tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro2
-rw-r--r--tests/auto/testlib/selftests/mouse/mouse.pro2
-rw-r--r--tests/auto/testlib/selftests/multiexec/multiexec.pro2
-rw-r--r--tests/auto/testlib/selftests/pairdiagnostics/pairdiagnostics.pro2
-rw-r--r--tests/auto/testlib/selftests/printdatatags/printdatatags.pro2
-rw-r--r--tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro2
-rw-r--r--tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro2
-rw-r--r--tests/auto/testlib/selftests/selftests.pri4
-rw-r--r--tests/auto/testlib/selftests/silent/silent.pro2
-rw-r--r--tests/auto/testlib/selftests/singleskip/singleskip.pro2
-rw-r--r--tests/auto/testlib/selftests/skip/skip.pro2
-rw-r--r--tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro2
-rw-r--r--tests/auto/testlib/selftests/skipinit/skipinit.pro2
-rw-r--r--tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro2
-rw-r--r--tests/auto/testlib/selftests/sleep/sleep.pro2
-rw-r--r--tests/auto/testlib/selftests/strcmp/strcmp.pro2
-rw-r--r--tests/auto/testlib/selftests/subtest/subtest.pro2
-rw-r--r--tests/auto/testlib/selftests/test/test.pro1
-rw-r--r--tests/auto/testlib/selftests/testlib/testlib.pro9
-rw-r--r--tests/auto/testlib/selftests/testlib/tst_testlib.cpp97
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp45
-rw-r--r--tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro2
-rw-r--r--tests/auto/testlib/selftests/verbose1/verbose1.pro2
-rw-r--r--tests/auto/testlib/selftests/verbose2/verbose2.pro2
-rw-r--r--tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro2
-rw-r--r--tests/auto/testlib/selftests/warnings/warnings.pro2
-rw-r--r--tests/auto/testlib/selftests/watchdog/tst_watchdog.cpp51
-rw-r--r--tests/auto/testlib/selftests/watchdog/watchdog.pro14
-rw-r--r--tests/auto/testlib/selftests/xunit/xunit.pro2
-rw-r--r--tests/auto/testlib/testlib.pro7
107 files changed, 1379 insertions, 178 deletions
diff --git a/tests/auto/testlib/outformat/outformat.pro b/tests/auto/testlib/outformat/outformat.pro
new file mode 100644
index 0000000000..ea02f3167f
--- /dev/null
+++ b/tests/auto/testlib/outformat/outformat.pro
@@ -0,0 +1,7 @@
+CONFIG += testcase
+QT = core testlib
+
+SOURCES += tst_outformat.cpp
+TARGET = outformat
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/outformat/tst_outformat.cpp b/tests/auto/testlib/outformat/tst_outformat.cpp
new file mode 100644
index 0000000000..5d131159a9
--- /dev/null
+++ b/tests/auto/testlib/outformat/tst_outformat.cpp
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** 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/QtTest>
+
+class tst_OutFormat : public QObject
+{
+ Q_OBJECT
+private slots:
+ void toHex_data() const;
+ void toHex() const;
+ // other formats of interest ?
+};
+
+void tst_OutFormat::toHex_data() const
+{
+ QTest::addColumn<QByteArray>("raw");
+ QTest::addColumn<QByteArray>("hex");
+
+ QTest::newRow("empty") << QByteArray("") << QByteArray("");
+ QTest::newRow("long")
+ << QByteArray("Truncates in ellipsis when more than fifty characters long")
+ << QByteArray("54 72 75 6E 63 61 74 65 73 20 69 6E 20 65 6C 6C "
+ "69 70 73 69 73 20 77 68 65 6E 20 6D 6F 72 65 20 "
+ "74 68 61 6E 20 66 69 66 74 79 20 63 68 61 72 61 "
+ "63 74 ...");
+ QTest::newRow("spaces")
+ << QByteArray(" \t\n\v\f\r") << QByteArray("20 09 0A 0B 0C 0D");
+ QTest::newRow("ASCII-escapes")
+ << QByteArray("\a\b\\\"'\177") << QByteArray("07 08 5C 22 27 7F");
+ // These are the ISO Latin-15 &nbsp;, pound, Euro, ..., y-umlaut
+ QTest::newRow("8-bit-sampler")
+ << QByteArray("\240\243\244\261\327\360\377") << QByteArray("A0 A3 A4 B1 D7 F0 FF");
+}
+
+void tst_OutFormat::toHex() const
+{
+ QFETCH(QByteArray, raw);
+ QFETCH(QByteArray, hex);
+ QScopedArrayPointer<char> repr(QTest::toHexRepresentation(raw.constData(), raw.size()));
+ QCOMPARE(repr.data(), hex);
+}
+
+QTEST_APPLESS_MAIN(tst_OutFormat)
+
+#include "tst_outformat.moc"
diff --git a/tests/auto/testlib/qabstractitemmodeltester/qabstractitemmodeltester.pro b/tests/auto/testlib/qabstractitemmodeltester/qabstractitemmodeltester.pro
index 306e8089f3..1aefc544d1 100644
--- a/tests/auto/testlib/qabstractitemmodeltester/qabstractitemmodeltester.pro
+++ b/tests/auto/testlib/qabstractitemmodeltester/qabstractitemmodeltester.pro
@@ -11,3 +11,5 @@ SOURCES += \
HEADERS += \
$${mtdir}/dynamictreemodel.h
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp b/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp
index 0593ae74bf..60aa350145 100644
--- a/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp
+++ b/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp
@@ -79,9 +79,9 @@ void tst_QAbstractItemModelTester::treeWidgetModel()
root->removeChild(remove);
QTreeWidgetItem *parent = new QTreeWidgetItem(&widget, QStringList("parent"));
new QTreeWidgetItem(parent, QStringList("child"));
- widget.setItemHidden(parent, true);
+ parent->setHidden(true);
- widget.sortByColumn(0);
+ widget.sortByColumn(0, Qt::AscendingOrder);
}
void tst_QAbstractItemModelTester::standardItemModel()
diff --git a/tests/auto/testlib/qsignalspy/qsignalspy.pro b/tests/auto/testlib/qsignalspy/qsignalspy.pro
index 1578802bf8..5343a98c14 100644
--- a/tests/auto/testlib/qsignalspy/qsignalspy.pro
+++ b/tests/auto/testlib/qsignalspy/qsignalspy.pro
@@ -2,3 +2,5 @@ CONFIG += testcase
TARGET = tst_qsignalspy
SOURCES += tst_qsignalspy.cpp
QT = core testlib
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/alive/alive.pro b/tests/auto/testlib/selftests/alive/alive.pro
index d3df09b10d..bda0db2282 100644
--- a/tests/auto/testlib/selftests/alive/alive.pro
+++ b/tests/auto/testlib/selftests/alive/alive.pro
@@ -6,3 +6,5 @@ CONFIG -= debug_and_release_target
TARGET = alive
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/assert/assert.pro b/tests/auto/testlib/selftests/assert/assert.pro
index cfc6a0c6b3..0692b6bdf2 100644
--- a/tests/auto/testlib/selftests/assert/assert.pro
+++ b/tests/auto/testlib/selftests/assert/assert.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = assert
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/badxml/badxml.pro b/tests/auto/testlib/selftests/badxml/badxml.pro
index 7b3b0f701c..4e15886504 100644
--- a/tests/auto/testlib/selftests/badxml/badxml.pro
+++ b/tests/auto/testlib/selftests/badxml/badxml.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = badxml
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro b/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro
index 6cbefe518c..12f068843e 100644
--- a/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro
+++ b/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = benchlibcallgrind
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp b/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp
index 0d3e884a56..fe83ee6608 100644
--- a/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp
+++ b/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp
@@ -68,9 +68,9 @@ void tst_BenchlibCallgrind::twoHundredMillionInstructions()
QBENCHMARK {
__asm__ __volatile__(
"mov $100000000,%%eax \n"
- "LOOPTOP: \n"
+ "1: \n"
"dec %%eax \n"
- "jnz LOOPTOP \n"
+ "jnz 1b \n"
: /* no output */
: /* no input */
: /* clobber */ "eax"
diff --git a/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro b/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro
index b495995eac..786511d057 100644
--- a/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro
+++ b/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = benchlibcounting
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro b/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro
index 5e2b963491..98fa0e4567 100644
--- a/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro
+++ b/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = benchlibeventcounter
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro b/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro
index f4bcc92129..0b627ecb10 100644
--- a/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro
+++ b/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = benchliboptions
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro b/tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro
index ce0ec7012c..f0741d5c26 100644
--- a/tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro
+++ b/tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro
@@ -6,3 +6,5 @@ CONFIG -= debug_and_release_target
TARGET = benchlibtickcounter
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro b/tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro
index 0e689871ab..80d97a2422 100644
--- a/tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro
+++ b/tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro
@@ -6,3 +6,5 @@ CONFIG -= debug_and_release_target
TARGET = benchlibwalltime
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/blacklisted/BLACKLIST b/tests/auto/testlib/selftests/blacklisted/BLACKLIST
index 36b7699cbd..a923c11416 100644
--- a/tests/auto/testlib/selftests/blacklisted/BLACKLIST
+++ b/tests/auto/testlib/selftests/blacklisted/BLACKLIST
@@ -1,12 +1,20 @@
-[pass]
+obscure # no such platform; is ignored
*
+
+[pass]
+!*
+
[skip]
*
+
[fail]
*
-[xpass]
-*
+
[xfail]
*
+
+[xpass]
+*
+
[messages]
*
diff --git a/tests/auto/testlib/selftests/blacklisted/blacklisted.pro b/tests/auto/testlib/selftests/blacklisted/blacklisted.pro
index 5bd22910b1..a8602ee266 100644
--- a/tests/auto/testlib/selftests/blacklisted/blacklisted.pro
+++ b/tests/auto/testlib/selftests/blacklisted/blacklisted.pro
@@ -5,3 +5,5 @@ mac: CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = blacklisted
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp b/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp
index b25489ca00..2f6d633e9d 100644
--- a/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp
+++ b/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp
@@ -45,7 +45,8 @@ private slots:
void messages();
};
-// All the tests below have been blacklisted in blacklisted/BLACKLIST
+// All the tests below except pass() have been blacklisted in blacklisted/BLACKLIST
+// Contrast with ../silent/, for the same tests without blacklisting but with -silent
void tst_Blacklisted::pass()
{
diff --git a/tests/auto/testlib/selftests/cmptest/cmptest.pro b/tests/auto/testlib/selftests/cmptest/cmptest.pro
index 2d5dd071a9..f38f5ecce1 100644
--- a/tests/auto/testlib/selftests/cmptest/cmptest.pro
+++ b/tests/auto/testlib/selftests/cmptest/cmptest.pro
@@ -6,3 +6,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = cmptest
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro b/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro
index 056388333a..8032ba5a02 100644
--- a/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro
+++ b/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = commandlinedata
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/counting/counting.pro b/tests/auto/testlib/selftests/counting/counting.pro
index 8aa2fe5753..be3a5339b0 100644
--- a/tests/auto/testlib/selftests/counting/counting.pro
+++ b/tests/auto/testlib/selftests/counting/counting.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = counting
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/crashes/crashes.pro b/tests/auto/testlib/selftests/crashes/crashes.pro
index 25e24243d1..00fa07a415 100644
--- a/tests/auto/testlib/selftests/crashes/crashes.pro
+++ b/tests/auto/testlib/selftests/crashes/crashes.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = crashes
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/datatable/datatable.pro b/tests/auto/testlib/selftests/datatable/datatable.pro
index 72fa851ae6..12a1f697b1 100644
--- a/tests/auto/testlib/selftests/datatable/datatable.pro
+++ b/tests/auto/testlib/selftests/datatable/datatable.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = datatable
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/datetime/datetime.pro b/tests/auto/testlib/selftests/datetime/datetime.pro
index d65c59354f..1524281090 100644
--- a/tests/auto/testlib/selftests/datetime/datetime.pro
+++ b/tests/auto/testlib/selftests/datetime/datetime.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = datetime
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/deleteLater/deleteLater.pro b/tests/auto/testlib/selftests/deleteLater/deleteLater.pro
index 6847238b1d..9a10096461 100644
--- a/tests/auto/testlib/selftests/deleteLater/deleteLater.pro
+++ b/tests/auto/testlib/selftests/deleteLater/deleteLater.pro
@@ -5,3 +5,5 @@ CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = tst_deleteLater
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/deleteLater_noApp/deleteLater_noApp.pro b/tests/auto/testlib/selftests/deleteLater_noApp/deleteLater_noApp.pro
index f860a767cd..6f2b253c14 100644
--- a/tests/auto/testlib/selftests/deleteLater_noApp/deleteLater_noApp.pro
+++ b/tests/auto/testlib/selftests/deleteLater_noApp/deleteLater_noApp.pro
@@ -5,3 +5,5 @@ CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = tst_deleteLater_noApp
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/differentexec/differentexec.pro b/tests/auto/testlib/selftests/differentexec/differentexec.pro
index 7f148ba996..339962f609 100644
--- a/tests/auto/testlib/selftests/differentexec/differentexec.pro
+++ b/tests/auto/testlib/selftests/differentexec/differentexec.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = differentexec
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro b/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro
index fe89f6f3cd..5473ec32c3 100644
--- a/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro
+++ b/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro
@@ -6,3 +6,5 @@ CONFIG -= debug_and_release_target
CONFIG += exceptions
TARGET = exceptionthrow
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/expected_blacklisted.tap b/tests/auto/testlib/selftests/expected_blacklisted.tap
index 7d3b2b0cc8..35f6d3df50 100644
--- a/tests/auto/testlib/selftests/expected_blacklisted.tap
+++ b/tests/auto/testlib/selftests/expected_blacklisted.tap
@@ -11,16 +11,16 @@ not ok 4 - fail() # TODO 'false' returned FALSE. (This test should BFAIL)
found: false (false)
expected: true (false)
actual: false (false)
- at: tst_Blacklisted::fail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:62)
+ at: tst_Blacklisted::fail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:63)
file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp
- line: 62
+ line: 63
...
not ok 4 - xfail() # TODO This test should BXFAIL then BPASS
---
# This test should BXFAIL then BPASS
- at: tst_Blacklisted::xfail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:68)
+ at: tst_Blacklisted::xfail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:69)
file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp
- line: 68
+ line: 69
...
ok 5 - xfail() # TODO
ok 6 - xpass() # TODO 'true' returned TRUE unexpectedly. (This test should BXPASS)
diff --git a/tests/auto/testlib/selftests/expected_faildatatype.lightxml b/tests/auto/testlib/selftests/expected_faildatatype.lightxml
new file mode 100644
index 0000000000..24992b78af
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_faildatatype.lightxml
@@ -0,0 +1,22 @@
+<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="value">
+<Message type="qdebug" file="" line="0">
+ <Description><![CDATA[expected data of type 'QString', got 'bool' for element 0 of data with tag 'bool-as-string']]></Description>
+</Message>
+<Message type="qfatal" file="" line="0">
+ <Description><![CDATA[ASSERT: "false" in file qtbase/src/testlib/qtestdata.cpp, line 0]]></Description>
+</Message>
+<Incident type="fail" file="Unknown file" line="0">
+ <Description><![CDATA[Received a fatal error.]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_faildatatype.tap b/tests/auto/testlib/selftests/expected_faildatatype.tap
new file mode 100644
index 0000000000..684cea4126
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_faildatatype.tap
@@ -0,0 +1,16 @@
+TAP version 13
+# tst_FailDataType
+ok 1 - initTestCase()
+# expected data of type 'QString', got 'bool' for element 0 of data with tag 'bool-as-string'
+# ASSERT: "false" in file qtbase/src/testlib/qtestdata.cpp, line 0
+not ok 2 - value()
+ ---
+ # Received a fatal error.
+ at: tst_FailDataType::value() (Unknown file:0)
+ file: Unknown file
+ line: 0
+ ...
+1..2
+# tests 2
+# pass 1
+# fail 1
diff --git a/tests/auto/testlib/selftests/expected_faildatatype.teamcity b/tests/auto/testlib/selftests/expected_faildatatype.teamcity
new file mode 100644
index 0000000000..82731ae09e
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_faildatatype.teamcity
@@ -0,0 +1,8 @@
+##teamcity[testSuiteStarted name='tst_FailDataType' flowId='tst_FailDataType']
+##teamcity[testStarted name='initTestCase()' flowId='tst_FailDataType']
+##teamcity[testFinished name='initTestCase()' flowId='tst_FailDataType']
+##teamcity[testStarted name='value()' flowId='tst_FailDataType']
+##teamcity[testFailed name='value()' message='Failure! |[Loc: Unknown file(0)|]' details='Received a fatal error.' flowId='tst_FailDataType']
+##teamcity[testStdOut name='value()' out='QDEBUG: expected data of type |'QString|', got |'bool|' for element 0 of data with tag |'bool-as-string|'|nQFATAL: ASSERT: "false" in file qtbase/src/testlib/qtestdata.cpp, line 0' flowId='tst_FailDataType']
+##teamcity[testFinished name='value()' flowId='tst_FailDataType']
+##teamcity[testSuiteFinished name='tst_FailDataType' flowId='tst_FailDataType']
diff --git a/tests/auto/testlib/selftests/expected_faildatatype.txt b/tests/auto/testlib/selftests/expected_faildatatype.txt
new file mode 100644
index 0000000000..4cfe3b7654
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_faildatatype.txt
@@ -0,0 +1,9 @@
+********* Start testing of tst_FailDataType *********
+Config: Using QtTest library
+PASS : tst_FailDataType::initTestCase()
+QDEBUG : tst_FailDataType::value() expected data of type 'QString', got 'bool' for element 0 of data with tag 'bool-as-string'
+QFATAL : tst_FailDataType::value() ASSERT: "false" in file qtbase/src/testlib/qtestdata.cpp, line 0
+FAIL! : tst_FailDataType::value() Received a fatal error.
+ Loc: [Unknown file(0)]
+Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms
+********* Finished testing of tst_FailDataType *********
diff --git a/tests/auto/testlib/selftests/expected_faildatatype.xml b/tests/auto/testlib/selftests/expected_faildatatype.xml
new file mode 100644
index 0000000000..8812bfab71
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_faildatatype.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestCase name="tst_FailDataType">
+<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="value">
+<Message type="qdebug" file="" line="0">
+ <Description><![CDATA[expected data of type 'QString', got 'bool' for element 0 of data with tag 'bool-as-string']]></Description>
+</Message>
+<Message type="qfatal" file="" line="0">
+ <Description><![CDATA[ASSERT: "false" in file qtbase/src/testlib/qtestdata.cpp, line 0]]></Description>
+</Message>
+<Incident type="fail" file="Unknown file" line="0">
+ <Description><![CDATA[Received a fatal error.]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
+</TestCase>
diff --git a/tests/auto/testlib/selftests/expected_faildatatype.xunitxml b/tests/auto/testlib/selftests/expected_faildatatype.xunitxml
new file mode 100644
index 0000000000..fcc0db3892
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_faildatatype.xunitxml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite errors="2" failures="1" tests="2" name="tst_FailDataType">
+ <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="fail" name="value">
+ <!-- message="expected data of type &apos;QString&apos;, got &apos;bool&apos; for element 0 of data with tag &apos;bool&#x002D;as&#x002D;string&apos;" type="qdebug" -->
+ <!-- message="ASSERT: &quot;false&quot; in file qtbase/src/testlib/qtestdata.cpp, line 92" type="qfatal" -->
+ <failure message="Received a fatal error." result="fail"/>
+ </testcase>
+ <system-err>
+<![CDATA[expected data of type 'QString', got 'bool' for element 0 of data with tag 'bool-as-string']]>
+<![CDATA[ASSERT: "false" in file qtbase/src/testlib/qtestdata.cpp, line 0]]>
+ </system-err>
+</testsuite>
diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.lightxml b/tests/auto/testlib/selftests/expected_failfetchtype.lightxml
new file mode 100644
index 0000000000..f7c84a1876
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failfetchtype.lightxml
@@ -0,0 +1,21 @@
+<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="fetch">
+<Message type="qfatal" file="" line="0">
+ <DataTag><![CDATA[bool]]></DataTag>
+ <Description><![CDATA[Requested type 'QString' does not match available type 'bool'.]]></Description>
+</Message>
+<Incident type="fail" file="Unknown file" line="0">
+ <DataTag><![CDATA[bool]]></DataTag>
+ <Description><![CDATA[Received a fatal error.]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.tap b/tests/auto/testlib/selftests/expected_failfetchtype.tap
new file mode 100644
index 0000000000..94c3b6e1b2
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failfetchtype.tap
@@ -0,0 +1,15 @@
+TAP version 13
+# tst_FailFetchType
+ok 1 - initTestCase()
+# Requested type 'QString' does not match available type 'bool'.
+not ok 2 - fetch(bool)
+ ---
+ # Received a fatal error.
+ at: tst_FailFetchType::fetch() (Unknown file:0)
+ file: Unknown file
+ line: 0
+ ...
+1..2
+# tests 2
+# pass 1
+# fail 1
diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.teamcity b/tests/auto/testlib/selftests/expected_failfetchtype.teamcity
new file mode 100644
index 0000000000..91cf0c6ae8
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failfetchtype.teamcity
@@ -0,0 +1,8 @@
+##teamcity[testSuiteStarted name='tst_FailFetchType' flowId='tst_FailFetchType']
+##teamcity[testStarted name='initTestCase()' flowId='tst_FailFetchType']
+##teamcity[testFinished name='initTestCase()' flowId='tst_FailFetchType']
+##teamcity[testStarted name='fetch(bool)' flowId='tst_FailFetchType']
+##teamcity[testFailed name='fetch(bool)' message='Failure! |[Loc: Unknown file(0)|]' details='Received a fatal error.' flowId='tst_FailFetchType']
+##teamcity[testStdOut name='fetch(bool)' out='QFATAL: Requested type |'QString|' does not match available type |'bool|'.' flowId='tst_FailFetchType']
+##teamcity[testFinished name='fetch(bool)' flowId='tst_FailFetchType']
+##teamcity[testSuiteFinished name='tst_FailFetchType' flowId='tst_FailFetchType']
diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.txt b/tests/auto/testlib/selftests/expected_failfetchtype.txt
new file mode 100644
index 0000000000..d12cf0dc7d
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failfetchtype.txt
@@ -0,0 +1,8 @@
+********* Start testing of tst_FailFetchType *********
+Config: Using QtTest library
+PASS : tst_FailFetchType::initTestCase()
+QFATAL : tst_FailFetchType::fetch(bool) Requested type 'QString' does not match available type 'bool'.
+FAIL! : tst_FailFetchType::fetch(bool) Received a fatal error.
+ Loc: [Unknown file(0)]
+Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms
+********* Finished testing of tst_FailFetchType *********
diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.xml b/tests/auto/testlib/selftests/expected_failfetchtype.xml
new file mode 100644
index 0000000000..a349baa710
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failfetchtype.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestCase name="tst_FailFetchType">
+<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="fetch">
+<Message type="qfatal" file="" line="0">
+ <DataTag><![CDATA[bool]]></DataTag>
+ <Description><![CDATA[Requested type 'QString' does not match available type 'bool'.]]></Description>
+</Message>
+<Incident type="fail" file="Unknown file" line="0">
+ <DataTag><![CDATA[bool]]></DataTag>
+ <Description><![CDATA[Received a fatal error.]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
+</TestCase>
diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.xunitxml b/tests/auto/testlib/selftests/expected_failfetchtype.xunitxml
new file mode 100644
index 0000000000..a54a37a913
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failfetchtype.xunitxml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite errors="1" failures="1" tests="2" name="tst_FailFetchType">
+ <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="fail" name="fetch">
+ <!-- tag="bool" message="Requested type &apos;QString&apos; does not match available type &apos;bool&apos;." type="qfatal" -->
+ <failure tag="bool" message="Received a fatal error." result="fail"/>
+ </testcase>
+ <system-err>
+<![CDATA[Requested type 'QString' does not match available type 'bool'.]]>
+ </system-err>
+</testsuite>
diff --git a/tests/auto/testlib/selftests/expected_float.lightxml b/tests/auto/testlib/selftests/expected_float.lightxml
index 79ce33627d..458f2277e6 100644
--- a/tests/auto/testlib/selftests/expected_float.lightxml
+++ b/tests/auto/testlib/selftests/expected_float.lightxml
@@ -427,6 +427,33 @@
</Incident>
<Duration msecs="0"/>
</TestFunction>
+<TestFunction name="float16Comparisons">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should SUCCEED 1]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 1]]></DataTag>
+ <Description><![CDATA[Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): 3]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 2]]></DataTag>
+ <Description><![CDATA[Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 0.0001
+ Expected (operandRight): 0.0003]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 3]]></DataTag>
+ <Description><![CDATA[Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 98
+ Expected (operandRight): 99]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should SUCCEED 2]]></DataTag>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
<TestFunction name="compareFloatTests">
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
<DataTag><![CDATA[1e0]]></DataTag>
diff --git a/tests/auto/testlib/selftests/expected_float.tap b/tests/auto/testlib/selftests/expected_float.tap
index 1896bb2fb3..277dd2b1d4 100644
--- a/tests/auto/testlib/selftests/expected_float.tap
+++ b/tests/auto/testlib/selftests/expected_float.tap
@@ -10,9 +10,9 @@ not ok 3 - doubleComparisons(should FAIL 1)
found: 1 (operandLeft)
expected: 3 (operandRight)
actual: 1 (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 4 - doubleComparisons(should FAIL 2)
---
@@ -22,9 +22,9 @@ not ok 4 - doubleComparisons(should FAIL 2)
found: 1e-07 (operandLeft)
expected: 3e-07 (operandRight)
actual: 1e-07 (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
ok 5 - doubleComparisons(should PASS 2)
not ok 6 - doubleComparisons(should FAIL 3)
@@ -35,9 +35,9 @@ not ok 6 - doubleComparisons(should FAIL 3)
found: 999999999999 (operandLeft)
expected: 999999999998 (operandRight)
actual: 999999999999 (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
ok 7 - doubleComparisons(should PASS 3)
not ok 8 - doubleComparisons(should FAIL 4)
@@ -48,9 +48,9 @@ not ok 8 - doubleComparisons(should FAIL 4)
found: 9.99999999999e-311 (operandLeft)
expected: 9.99999999997e-311 (operandRight)
actual: 9.99999999999e-311 (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
ok 9 - doubleComparisons(should PASS 4)
not ok 10 - doubleComparisons(should FAIL 5)
@@ -61,9 +61,9 @@ not ok 10 - doubleComparisons(should FAIL 5)
found: 9.99999999999e+306 (operandLeft)
expected: 9.99999999997e+306 (operandRight)
actual: 9.99999999999e+306 (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
ok 11 - doubleComparisons(should PASS: NaN == NaN)
not ok 12 - doubleComparisons(should FAIL: NaN != 0)
@@ -74,9 +74,9 @@ not ok 12 - doubleComparisons(should FAIL: NaN != 0)
found: nan (operandLeft)
expected: 0 (operandRight)
actual: nan (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 13 - doubleComparisons(should FAIL: 0 != NaN)
---
@@ -86,9 +86,9 @@ not ok 13 - doubleComparisons(should FAIL: 0 != NaN)
found: 0 (operandLeft)
expected: nan (operandRight)
actual: 0 (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 14 - doubleComparisons(should FAIL: NaN != 1)
---
@@ -98,9 +98,9 @@ not ok 14 - doubleComparisons(should FAIL: NaN != 1)
found: nan (operandLeft)
expected: 1 (operandRight)
actual: nan (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 15 - doubleComparisons(should FAIL: 1 != NaN)
---
@@ -110,9 +110,9 @@ not ok 15 - doubleComparisons(should FAIL: 1 != NaN)
found: 1 (operandLeft)
expected: nan (operandRight)
actual: 1 (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
ok 16 - doubleComparisons(should PASS: inf == inf)
ok 17 - doubleComparisons(should PASS: -inf == -inf)
@@ -124,9 +124,9 @@ not ok 18 - doubleComparisons(should FAIL: inf != -inf)
found: inf (operandLeft)
expected: -inf (operandRight)
actual: inf (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 19 - doubleComparisons(should FAIL: -inf != inf)
---
@@ -136,9 +136,9 @@ not ok 19 - doubleComparisons(should FAIL: -inf != inf)
found: -inf (operandLeft)
expected: inf (operandRight)
actual: -inf (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 20 - doubleComparisons(should FAIL: inf != nan)
---
@@ -148,9 +148,9 @@ not ok 20 - doubleComparisons(should FAIL: inf != nan)
found: inf (operandLeft)
expected: nan (operandRight)
actual: inf (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 21 - doubleComparisons(should FAIL: nan != inf)
---
@@ -160,9 +160,9 @@ not ok 21 - doubleComparisons(should FAIL: nan != inf)
found: nan (operandLeft)
expected: inf (operandRight)
actual: nan (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 22 - doubleComparisons(should FAIL: -inf != nan)
---
@@ -172,9 +172,9 @@ not ok 22 - doubleComparisons(should FAIL: -inf != nan)
found: -inf (operandLeft)
expected: nan (operandRight)
actual: -inf (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 23 - doubleComparisons(should FAIL: nan != -inf)
---
@@ -184,9 +184,9 @@ not ok 23 - doubleComparisons(should FAIL: nan != -inf)
found: nan (operandLeft)
expected: -inf (operandRight)
actual: nan (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 24 - doubleComparisons(should FAIL: inf != 0)
---
@@ -196,9 +196,9 @@ not ok 24 - doubleComparisons(should FAIL: inf != 0)
found: inf (operandLeft)
expected: 0 (operandRight)
actual: inf (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 25 - doubleComparisons(should FAIL: 0 != inf)
---
@@ -208,9 +208,9 @@ not ok 25 - doubleComparisons(should FAIL: 0 != inf)
found: 0 (operandLeft)
expected: inf (operandRight)
actual: 0 (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 26 - doubleComparisons(should FAIL: -inf != 0)
---
@@ -220,9 +220,9 @@ not ok 26 - doubleComparisons(should FAIL: -inf != 0)
found: -inf (operandLeft)
expected: 0 (operandRight)
actual: -inf (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 27 - doubleComparisons(should FAIL: 0 != -inf)
---
@@ -232,9 +232,9 @@ not ok 27 - doubleComparisons(should FAIL: 0 != -inf)
found: 0 (operandLeft)
expected: -inf (operandRight)
actual: 0 (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 28 - doubleComparisons(should FAIL: inf != 1)
---
@@ -244,9 +244,9 @@ not ok 28 - doubleComparisons(should FAIL: inf != 1)
found: inf (operandLeft)
expected: 1 (operandRight)
actual: inf (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 29 - doubleComparisons(should FAIL: 1 != inf)
---
@@ -256,9 +256,9 @@ not ok 29 - doubleComparisons(should FAIL: 1 != inf)
found: 1 (operandLeft)
expected: inf (operandRight)
actual: 1 (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 30 - doubleComparisons(should FAIL: -inf != 1)
---
@@ -268,9 +268,9 @@ not ok 30 - doubleComparisons(should FAIL: -inf != 1)
found: -inf (operandLeft)
expected: 1 (operandRight)
actual: -inf (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 31 - doubleComparisons(should FAIL: 1 != -inf)
---
@@ -280,9 +280,9 @@ not ok 31 - doubleComparisons(should FAIL: 1 != -inf)
found: 1 (operandLeft)
expected: -inf (operandRight)
actual: 1 (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 32 - doubleComparisons(should FAIL: inf != max)
---
@@ -292,9 +292,9 @@ not ok 32 - doubleComparisons(should FAIL: inf != max)
found: inf (operandLeft)
expected: 1.79769313486e+308 (operandRight)
actual: inf (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 33 - doubleComparisons(should FAIL: inf != -max)
---
@@ -304,9 +304,9 @@ not ok 33 - doubleComparisons(should FAIL: inf != -max)
found: inf (operandLeft)
expected: -1.79769313486e+308 (operandRight)
actual: inf (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 34 - doubleComparisons(should FAIL: max != inf)
---
@@ -316,9 +316,9 @@ not ok 34 - doubleComparisons(should FAIL: max != inf)
found: 1.79769313486e+308 (operandLeft)
expected: inf (operandRight)
actual: 1.79769313486e+308 (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 35 - doubleComparisons(should FAIL: -max != inf)
---
@@ -328,9 +328,9 @@ not ok 35 - doubleComparisons(should FAIL: -max != inf)
found: -1.79769313486e+308 (operandLeft)
expected: inf (operandRight)
actual: -1.79769313486e+308 (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 36 - doubleComparisons(should FAIL: -inf != max)
---
@@ -340,9 +340,9 @@ not ok 36 - doubleComparisons(should FAIL: -inf != max)
found: -inf (operandLeft)
expected: 1.79769313486e+308 (operandRight)
actual: -inf (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 37 - doubleComparisons(should FAIL: -inf != -max)
---
@@ -352,9 +352,9 @@ not ok 37 - doubleComparisons(should FAIL: -inf != -max)
found: -inf (operandLeft)
expected: -1.79769313486e+308 (operandRight)
actual: -inf (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 38 - doubleComparisons(should FAIL: max != -inf)
---
@@ -364,9 +364,9 @@ not ok 38 - doubleComparisons(should FAIL: max != -inf)
found: 1.79769313486e+308 (operandLeft)
expected: -inf (operandRight)
actual: 1.79769313486e+308 (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 39 - doubleComparisons(should FAIL: -max != -inf)
---
@@ -376,9 +376,9 @@ not ok 39 - doubleComparisons(should FAIL: -max != -inf)
found: -1.79769313486e+308 (operandLeft)
expected: -inf (operandRight)
actual: -1.79769313486e+308 (operandLeft)
- at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
+ at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:54)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 51
+ line: 54
...
not ok 40 - floatComparisons(should FAIL 1)
---
@@ -388,9 +388,9 @@ not ok 40 - floatComparisons(should FAIL 1)
found: 1 (operandLeft)
expected: 3 (operandRight)
actual: 1 (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
ok 41 - floatComparisons(should PASS 1)
not ok 42 - floatComparisons(should FAIL 2)
@@ -401,9 +401,9 @@ not ok 42 - floatComparisons(should FAIL 2)
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:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
ok 43 - floatComparisons(should PASS 2)
not ok 44 - floatComparisons(should FAIL 3)
@@ -414,9 +414,9 @@ not ok 44 - floatComparisons(should FAIL 3)
found: 99999 (operandLeft)
expected: 99998 (operandRight)
actual: 99999 (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
ok 45 - floatComparisons(should PASS 3)
not ok 46 - floatComparisons(should FAIL 4)
@@ -427,9 +427,9 @@ not ok 46 - floatComparisons(should FAIL 4)
found: 9.9999e-40 (operandLeft)
expected: 9.99971e-40 (operandRight)
actual: 9.9999e-40 (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
ok 47 - floatComparisons(should PASS 4)
not ok 48 - floatComparisons(should FAIL 5)
@@ -440,9 +440,9 @@ not ok 48 - floatComparisons(should FAIL 5)
found: 9.9999e+37 (operandLeft)
expected: 9.9997e+37 (operandRight)
actual: 9.9999e+37 (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
ok 49 - floatComparisons(should PASS: NaN == NaN)
not ok 50 - floatComparisons(should FAIL: NaN != 0)
@@ -453,9 +453,9 @@ not ok 50 - floatComparisons(should FAIL: NaN != 0)
found: nan (operandLeft)
expected: 0 (operandRight)
actual: nan (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 51 - floatComparisons(should FAIL: 0 != NaN)
---
@@ -465,9 +465,9 @@ not ok 51 - floatComparisons(should FAIL: 0 != NaN)
found: 0 (operandLeft)
expected: nan (operandRight)
actual: 0 (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 52 - floatComparisons(should FAIL: NaN != 1)
---
@@ -477,9 +477,9 @@ not ok 52 - floatComparisons(should FAIL: NaN != 1)
found: nan (operandLeft)
expected: 1 (operandRight)
actual: nan (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 53 - floatComparisons(should FAIL: 1 != NaN)
---
@@ -489,9 +489,9 @@ not ok 53 - floatComparisons(should FAIL: 1 != NaN)
found: 1 (operandLeft)
expected: nan (operandRight)
actual: 1 (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
ok 54 - floatComparisons(should PASS: inf == inf)
ok 55 - floatComparisons(should PASS: -inf == -inf)
@@ -503,9 +503,9 @@ not ok 56 - floatComparisons(should FAIL: inf != -inf)
found: inf (operandLeft)
expected: -inf (operandRight)
actual: inf (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 57 - floatComparisons(should FAIL: -inf != inf)
---
@@ -515,9 +515,9 @@ not ok 57 - floatComparisons(should FAIL: -inf != inf)
found: -inf (operandLeft)
expected: inf (operandRight)
actual: -inf (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 58 - floatComparisons(should FAIL: inf != nan)
---
@@ -527,9 +527,9 @@ not ok 58 - floatComparisons(should FAIL: inf != nan)
found: inf (operandLeft)
expected: nan (operandRight)
actual: inf (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 59 - floatComparisons(should FAIL: nan != inf)
---
@@ -539,9 +539,9 @@ not ok 59 - floatComparisons(should FAIL: nan != inf)
found: nan (operandLeft)
expected: inf (operandRight)
actual: nan (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 60 - floatComparisons(should FAIL: -inf != nan)
---
@@ -551,9 +551,9 @@ not ok 60 - floatComparisons(should FAIL: -inf != nan)
found: -inf (operandLeft)
expected: nan (operandRight)
actual: -inf (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 61 - floatComparisons(should FAIL: nan != -inf)
---
@@ -563,9 +563,9 @@ not ok 61 - floatComparisons(should FAIL: nan != -inf)
found: nan (operandLeft)
expected: -inf (operandRight)
actual: nan (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 62 - floatComparisons(should FAIL: inf != 0)
---
@@ -575,9 +575,9 @@ not ok 62 - floatComparisons(should FAIL: inf != 0)
found: inf (operandLeft)
expected: 0 (operandRight)
actual: inf (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 63 - floatComparisons(should FAIL: 0 != inf)
---
@@ -587,9 +587,9 @@ not ok 63 - floatComparisons(should FAIL: 0 != inf)
found: 0 (operandLeft)
expected: inf (operandRight)
actual: 0 (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 64 - floatComparisons(should FAIL: -inf != 0)
---
@@ -599,9 +599,9 @@ not ok 64 - floatComparisons(should FAIL: -inf != 0)
found: -inf (operandLeft)
expected: 0 (operandRight)
actual: -inf (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 65 - floatComparisons(should FAIL: 0 != -inf)
---
@@ -611,9 +611,9 @@ not ok 65 - floatComparisons(should FAIL: 0 != -inf)
found: 0 (operandLeft)
expected: -inf (operandRight)
actual: 0 (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 66 - floatComparisons(should FAIL: inf != 1)
---
@@ -623,9 +623,9 @@ not ok 66 - floatComparisons(should FAIL: inf != 1)
found: inf (operandLeft)
expected: 1 (operandRight)
actual: inf (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 67 - floatComparisons(should FAIL: 1 != inf)
---
@@ -635,9 +635,9 @@ not ok 67 - floatComparisons(should FAIL: 1 != inf)
found: 1 (operandLeft)
expected: inf (operandRight)
actual: 1 (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 68 - floatComparisons(should FAIL: -inf != 1)
---
@@ -647,9 +647,9 @@ not ok 68 - floatComparisons(should FAIL: -inf != 1)
found: -inf (operandLeft)
expected: 1 (operandRight)
actual: -inf (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 69 - floatComparisons(should FAIL: 1 != -inf)
---
@@ -659,9 +659,9 @@ not ok 69 - floatComparisons(should FAIL: 1 != -inf)
found: 1 (operandLeft)
expected: -inf (operandRight)
actual: 1 (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 70 - floatComparisons(should FAIL: inf != max)
---
@@ -671,9 +671,9 @@ not ok 70 - floatComparisons(should FAIL: inf != max)
found: inf (operandLeft)
expected: 3.40282e+38 (operandRight)
actual: inf (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 71 - floatComparisons(should FAIL: inf != -max)
---
@@ -683,9 +683,9 @@ not ok 71 - floatComparisons(should FAIL: inf != -max)
found: inf (operandLeft)
expected: -3.40282e+38 (operandRight)
actual: inf (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 72 - floatComparisons(should FAIL: max != inf)
---
@@ -695,9 +695,9 @@ not ok 72 - floatComparisons(should FAIL: max != inf)
found: 3.40282e+38 (operandLeft)
expected: inf (operandRight)
actual: 3.40282e+38 (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 73 - floatComparisons(should FAIL: -max != inf)
---
@@ -707,9 +707,9 @@ not ok 73 - floatComparisons(should FAIL: -max != inf)
found: -3.40282e+38 (operandLeft)
expected: inf (operandRight)
actual: -3.40282e+38 (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 74 - floatComparisons(should FAIL: -inf != max)
---
@@ -719,9 +719,9 @@ not ok 74 - floatComparisons(should FAIL: -inf != max)
found: -inf (operandLeft)
expected: 3.40282e+38 (operandRight)
actual: -inf (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 75 - floatComparisons(should FAIL: -inf != -max)
---
@@ -731,9 +731,9 @@ not ok 75 - floatComparisons(should FAIL: -inf != -max)
found: -inf (operandLeft)
expected: -3.40282e+38 (operandRight)
actual: -inf (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 76 - floatComparisons(should FAIL: max != -inf)
---
@@ -743,9 +743,9 @@ not ok 76 - floatComparisons(should FAIL: max != -inf)
found: 3.40282e+38 (operandLeft)
expected: -inf (operandRight)
actual: 3.40282e+38 (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
not ok 77 - floatComparisons(should FAIL: -max != -inf)
---
@@ -755,11 +755,49 @@ not ok 77 - floatComparisons(should FAIL: -max != -inf)
found: -3.40282e+38 (operandLeft)
expected: -inf (operandRight)
actual: -3.40282e+38 (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:127)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 124
+ line: 127
...
-not ok 78 - compareFloatTests(1e0)
+ok 78 - float16Comparisons(should SUCCEED 1)
+not ok 79 - float16Comparisons(should FAIL 1)
+ ---
+ type: QCOMPARE
+ message: Compared qfloat16s are not the same (fuzzy compare)
+ wanted: 3 (operandRight)
+ found: 1 (operandLeft)
+ expected: 3 (operandRight)
+ actual: 1 (operandLeft)
+ at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:200)
+ file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
+ line: 200
+ ...
+not ok 80 - float16Comparisons(should FAIL 2)
+ ---
+ type: QCOMPARE
+ message: Compared qfloat16s are not the same (fuzzy compare)
+ wanted: 0.0003 (operandRight)
+ found: 0.0001 (operandLeft)
+ expected: 0.0003 (operandRight)
+ actual: 0.0001 (operandLeft)
+ at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:200)
+ file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
+ line: 200
+ ...
+not ok 81 - float16Comparisons(should FAIL 3)
+ ---
+ type: QCOMPARE
+ message: Compared qfloat16s are not the same (fuzzy compare)
+ wanted: 99 (operandRight)
+ found: 98 (operandLeft)
+ expected: 99 (operandRight)
+ actual: 98 (operandLeft)
+ at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:200)
+ file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
+ line: 200
+ ...
+ok 82 - float16Comparisons(should SUCCEED 2)
+not ok 83 - compareFloatTests(1e0)
---
type: QCOMPARE
message: Compared floats are not the same (fuzzy compare)
@@ -767,11 +805,11 @@ not ok 78 - compareFloatTests(1e0)
found: 1 (t1)
expected: 3 (t3)
actual: 1 (t1)
- at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:206)
+ at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:245)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 206
+ line: 245
...
-not ok 79 - compareFloatTests(1e-7)
+not ok 84 - compareFloatTests(1e-7)
---
type: QCOMPARE
message: Compared floats are not the same (fuzzy compare)
@@ -779,11 +817,11 @@ not ok 79 - compareFloatTests(1e-7)
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:206)
+ at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:245)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 206
+ line: 245
...
-not ok 80 - compareFloatTests(1e+7)
+not ok 85 - compareFloatTests(1e+7)
---
type: QCOMPARE
message: Compared floats are not the same (fuzzy compare)
@@ -791,12 +829,12 @@ not ok 80 - compareFloatTests(1e+7)
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:206)
+ at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:245)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 206
+ line: 245
...
-ok 81 - cleanupTestCase()
-1..81
-# tests 81
-# pass 16
-# fail 65
+ok 86 - cleanupTestCase()
+1..86
+# tests 86
+# pass 18
+# fail 68
diff --git a/tests/auto/testlib/selftests/expected_float.teamcity b/tests/auto/testlib/selftests/expected_float.teamcity
index 9166f644af..e23bc722b1 100644
--- a/tests/auto/testlib/selftests/expected_float.teamcity
+++ b/tests/auto/testlib/selftests/expected_float.teamcity
@@ -215,6 +215,19 @@
##teamcity[testStarted name='floatComparisons(should FAIL: -max != -inf)' flowId='tst_float']
##teamcity[testFailed name='floatComparisons(should FAIL: -max != -inf)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)|]' details='Compared floats are not the same (fuzzy compare)|n Actual (operandLeft) : -3.40282e+38|n Expected (operandRight): -inf' flowId='tst_float']
##teamcity[testFinished name='floatComparisons(should FAIL: -max != -inf)' flowId='tst_float']
+##teamcity[testStarted name='float16Comparisons(should SUCCEED 1)' flowId='tst_float']
+##teamcity[testFinished name='float16Comparisons(should SUCCEED 1)' flowId='tst_float']
+##teamcity[testStarted name='float16Comparisons(should FAIL 1)' flowId='tst_float']
+##teamcity[testFailed name='float16Comparisons(should FAIL 1)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)|]' details='Compared qfloat16s are not the same (fuzzy compare)|n Actual (operandLeft) : 1|n Expected (operandRight): 3' flowId='tst_float']
+##teamcity[testFinished name='float16Comparisons(should FAIL 1)' flowId='tst_float']
+##teamcity[testStarted name='float16Comparisons(should FAIL 2)' flowId='tst_float']
+##teamcity[testFailed name='float16Comparisons(should FAIL 2)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)|]' details='Compared qfloat16s are not the same (fuzzy compare)|n Actual (operandLeft) : 0.0001|n Expected (operandRight): 0.0003' flowId='tst_float']
+##teamcity[testFinished name='float16Comparisons(should FAIL 2)' flowId='tst_float']
+##teamcity[testStarted name='float16Comparisons(should FAIL 3)' flowId='tst_float']
+##teamcity[testFailed name='float16Comparisons(should FAIL 3)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)|]' details='Compared qfloat16s are not the same (fuzzy compare)|n Actual (operandLeft) : 98|n Expected (operandRight): 99' flowId='tst_float']
+##teamcity[testFinished name='float16Comparisons(should FAIL 3)' flowId='tst_float']
+##teamcity[testStarted name='float16Comparisons(should SUCCEED 2)' flowId='tst_float']
+##teamcity[testFinished name='float16Comparisons(should SUCCEED 2)' flowId='tst_float']
##teamcity[testStarted name='compareFloatTests(1e0)' flowId='tst_float']
##teamcity[testFailed name='compareFloatTests(1e0)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)|]' details='Compared floats are not the same (fuzzy compare)|n Actual (t1): 1|n Expected (t3): 3' flowId='tst_float']
##teamcity[testFinished name='compareFloatTests(1e0)' flowId='tst_float']
diff --git a/tests/auto/testlib/selftests/expected_float.txt b/tests/auto/testlib/selftests/expected_float.txt
index 3134196a9c..6419a13f86 100644
--- a/tests/auto/testlib/selftests/expected_float.txt
+++ b/tests/auto/testlib/selftests/expected_float.txt
@@ -263,6 +263,20 @@ FAIL! : tst_float::floatComparisons(should FAIL: -max != -inf) Compared floats
Actual (operandLeft) : -3.40282e+38
Expected (operandRight): -inf
Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)]
+PASS : tst_float::float16Comparisons(should SUCCEED 1)
+FAIL! : tst_float::float16Comparisons(should FAIL 1) Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): 3
+ Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)]
+FAIL! : tst_float::float16Comparisons(should FAIL 2) Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 0.0001
+ Expected (operandRight): 0.0003
+ Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)]
+FAIL! : tst_float::float16Comparisons(should FAIL 3) Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 98
+ Expected (operandRight): 99
+ Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)]
+PASS : tst_float::float16Comparisons(should SUCCEED 2)
FAIL! : tst_float::compareFloatTests(1e0) Compared floats are not the same (fuzzy compare)
Actual (t1): 1
Expected (t3): 3
@@ -276,5 +290,5 @@ FAIL! : tst_float::compareFloatTests(1e+7) Compared floats are not the same (fu
Expected (t3): 3e+07
Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)]
PASS : tst_float::cleanupTestCase()
-Totals: 16 passed, 65 failed, 0 skipped, 0 blacklisted, 0ms
+Totals: 18 passed, 68 failed, 0 skipped, 0 blacklisted, 0ms
********* Finished testing of tst_float *********
diff --git a/tests/auto/testlib/selftests/expected_float.xml b/tests/auto/testlib/selftests/expected_float.xml
index da934eead3..65d2c5ad96 100644
--- a/tests/auto/testlib/selftests/expected_float.xml
+++ b/tests/auto/testlib/selftests/expected_float.xml
@@ -429,6 +429,33 @@
</Incident>
<Duration msecs="0"/>
</TestFunction>
+<TestFunction name="float16Comparisons">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should SUCCEED 1]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 1]]></DataTag>
+ <Description><![CDATA[Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): 3]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 2]]></DataTag>
+ <Description><![CDATA[Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 0.0001
+ Expected (operandRight): 0.0003]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 3]]></DataTag>
+ <Description><![CDATA[Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 98
+ Expected (operandRight): 99]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should SUCCEED 2]]></DataTag>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
<TestFunction name="compareFloatTests">
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
<DataTag><![CDATA[1e0]]></DataTag>
diff --git a/tests/auto/testlib/selftests/expected_float.xunitxml b/tests/auto/testlib/selftests/expected_float.xunitxml
index ba96b16fe6..9b2af9b616 100644
--- a/tests/auto/testlib/selftests/expected_float.xunitxml
+++ b/tests/auto/testlib/selftests/expected_float.xunitxml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<testsuite errors="0" failures="65" tests="5" name="tst_float">
+<testsuite errors="0" failures="68" tests="6" name="tst_float">
<properties>
<property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
<property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
@@ -196,6 +196,17 @@
Actual (operandLeft) : &#x002D;3.40282e+38
Expected (operandRight): &#x002D;inf" result="fail"/>
</testcase>
+ <testcase result="fail" name="float16Comparisons">
+ <failure tag="should FAIL 1" message="Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): 3" result="fail"/>
+ <failure tag="should FAIL 2" message="Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 0.0001
+ Expected (operandRight): 0.0003" result="fail"/>
+ <failure tag="should FAIL 3" message="Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 98
+ Expected (operandRight): 99" result="fail"/>
+ </testcase>
<testcase result="fail" name="compareFloatTests">
<failure tag="1e0" message="Compared floats are not the same (fuzzy compare)
Actual (t1): 1
diff --git a/tests/auto/testlib/selftests/expected_testlib.lightxml b/tests/auto/testlib/selftests/expected_testlib.lightxml
new file mode 100644
index 0000000000..47f5edc07d
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_testlib.lightxml
@@ -0,0 +1,45 @@
+<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="basics">
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp" line="0">
+ <Description><![CDATA[Compared pointers are not the same]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="delays">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="reals">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[zero]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[self-qQNaN]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[self-qInf]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[infineg]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[Sin(turn/4)]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[Cos(turn/2)]]></DataTag>
+</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_testlib.tap b/tests/auto/testlib/selftests/expected_testlib.tap
new file mode 100644
index 0000000000..d85b23b7d4
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_testlib.tap
@@ -0,0 +1,22 @@
+TAP version 13
+# tst_TestLib
+ok 1 - initTestCase()
+not ok 2 - basics()
+ ---
+ # Compared pointers are not the same
+ at: tst_TestLib::basics() (qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp:54)
+ file: qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp
+ line: 54
+ ...
+ok 3 - delays()
+ok 4 - reals(zero)
+ok 5 - reals(self-qQNaN)
+ok 6 - reals(self-qInf)
+ok 7 - reals(infineg)
+ok 8 - reals(Sin(turn/4))
+ok 9 - reals(Cos(turn/2))
+ok 10 - cleanupTestCase()
+1..10
+# tests 10
+# pass 9
+# fail 1
diff --git a/tests/auto/testlib/selftests/expected_testlib.teamcity b/tests/auto/testlib/selftests/expected_testlib.teamcity
new file mode 100644
index 0000000000..11617121e2
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_testlib.teamcity
@@ -0,0 +1,23 @@
+##teamcity[testSuiteStarted name='tst_TestLib' flowId='tst_TestLib']
+##teamcity[testStarted name='initTestCase()' flowId='tst_TestLib']
+##teamcity[testFinished name='initTestCase()' flowId='tst_TestLib']
+##teamcity[testStarted name='basics()' flowId='tst_TestLib']
+##teamcity[testFailed name='basics()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp(0)|]' details='Compared pointers are not the same' flowId='tst_TestLib']
+##teamcity[testFinished name='basics()' flowId='tst_TestLib']
+##teamcity[testStarted name='delays()' flowId='tst_TestLib']
+##teamcity[testFinished name='delays()' flowId='tst_TestLib']
+##teamcity[testStarted name='reals(zero)' flowId='tst_TestLib']
+##teamcity[testFinished name='reals(zero)' flowId='tst_TestLib']
+##teamcity[testStarted name='reals(self-qQNaN)' flowId='tst_TestLib']
+##teamcity[testFinished name='reals(self-qQNaN)' flowId='tst_TestLib']
+##teamcity[testStarted name='reals(self-qInf)' flowId='tst_TestLib']
+##teamcity[testFinished name='reals(self-qInf)' flowId='tst_TestLib']
+##teamcity[testStarted name='reals(infineg)' flowId='tst_TestLib']
+##teamcity[testFinished name='reals(infineg)' flowId='tst_TestLib']
+##teamcity[testStarted name='reals(Sin(turn/4))' flowId='tst_TestLib']
+##teamcity[testFinished name='reals(Sin(turn/4))' flowId='tst_TestLib']
+##teamcity[testStarted name='reals(Cos(turn/2))' flowId='tst_TestLib']
+##teamcity[testFinished name='reals(Cos(turn/2))' flowId='tst_TestLib']
+##teamcity[testStarted name='cleanupTestCase()' flowId='tst_TestLib']
+##teamcity[testFinished name='cleanupTestCase()' flowId='tst_TestLib']
+##teamcity[testSuiteFinished name='tst_TestLib' flowId='tst_TestLib']
diff --git a/tests/auto/testlib/selftests/expected_testlib.txt b/tests/auto/testlib/selftests/expected_testlib.txt
new file mode 100644
index 0000000000..a3f463e7d4
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_testlib.txt
@@ -0,0 +1,15 @@
+********* Start testing of tst_TestLib *********
+Config: Using QtTest library
+PASS : tst_TestLib::initTestCase()
+FAIL! : tst_TestLib::basics() Compared pointers are not the same
+ Loc: [qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp(0)]
+PASS : tst_TestLib::delays()
+PASS : tst_TestLib::reals(zero)
+PASS : tst_TestLib::reals(self-qQNaN)
+PASS : tst_TestLib::reals(self-qInf)
+PASS : tst_TestLib::reals(infineg)
+PASS : tst_TestLib::reals(Sin(turn/4))
+PASS : tst_TestLib::reals(Cos(turn/2))
+PASS : tst_TestLib::cleanupTestCase()
+Totals: 9 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms
+********* Finished testing of tst_TestLib *********
diff --git a/tests/auto/testlib/selftests/expected_testlib.xml b/tests/auto/testlib/selftests/expected_testlib.xml
new file mode 100644
index 0000000000..3aca904ac1
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_testlib.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestCase name="tst_TestLib">
+<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="basics">
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp" line="0">
+ <Description><![CDATA[Compared pointers are not the same]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="delays">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="reals">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[zero]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[self-qQNaN]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[self-qInf]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[infineg]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[Sin(turn/4)]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[Cos(turn/2)]]></DataTag>
+</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_testlib.xunitxml b/tests/auto/testlib/selftests/expected_testlib.xunitxml
new file mode 100644
index 0000000000..c9c67c7c9a
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_testlib.xunitxml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite errors="0" failures="1" tests="5" name="tst_TestLib">
+ <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="fail" name="basics">
+ <failure message="Compared pointers are not the same" result="fail"/>
+ </testcase>
+ <testcase result="pass" name="delays"/>
+ <testcase result="pass" name="reals"/>
+ <testcase result="pass" name="cleanupTestCase"/>
+ <system-err/>
+</testsuite>
diff --git a/tests/auto/testlib/selftests/expected_watchdog.lightxml b/tests/auto/testlib/selftests/expected_watchdog.lightxml
new file mode 100644
index 0000000000..1070324f2a
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_watchdog.lightxml
@@ -0,0 +1,19 @@
+<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="delay">
+<Message type="qfatal" file="" line="0">
+ <Description><![CDATA[Test function timed out]]></Description>
+</Message>
+<Incident type="fail" file="Unknown file" line="0">
+ <Description><![CDATA[Received a fatal error.]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_watchdog.tap b/tests/auto/testlib/selftests/expected_watchdog.tap
new file mode 100644
index 0000000000..3d4890b67e
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_watchdog.tap
@@ -0,0 +1,15 @@
+TAP version 13
+# tst_Watchdog
+ok 1 - initTestCase()
+# Test function timed out
+not ok 2 - delay()
+ ---
+ # Received a fatal error.
+ at: tst_Watchdog::delay() (Unknown file:0)
+ file: Unknown file
+ line: 0
+ ...
+1..2
+# tests 2
+# pass 1
+# fail 1
diff --git a/tests/auto/testlib/selftests/expected_watchdog.teamcity b/tests/auto/testlib/selftests/expected_watchdog.teamcity
new file mode 100644
index 0000000000..0d77bf70d5
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_watchdog.teamcity
@@ -0,0 +1,8 @@
+##teamcity[testSuiteStarted name='tst_Watchdog' flowId='tst_Watchdog']
+##teamcity[testStarted name='initTestCase()' flowId='tst_Watchdog']
+##teamcity[testFinished name='initTestCase()' flowId='tst_Watchdog']
+##teamcity[testStarted name='delay()' flowId='tst_Watchdog']
+##teamcity[testFailed name='delay()' message='Failure! |[Loc: Unknown file(0)|]' details='Received a fatal error.' flowId='tst_Watchdog']
+##teamcity[testStdOut name='delay()' out='QFATAL: Test function timed out' flowId='tst_Watchdog']
+##teamcity[testFinished name='delay()' flowId='tst_Watchdog']
+##teamcity[testSuiteFinished name='tst_Watchdog' flowId='tst_Watchdog']
diff --git a/tests/auto/testlib/selftests/expected_watchdog.txt b/tests/auto/testlib/selftests/expected_watchdog.txt
new file mode 100644
index 0000000000..4c9cde4ea2
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_watchdog.txt
@@ -0,0 +1,8 @@
+********* Start testing of tst_Watchdog *********
+Config: Using QtTest library
+PASS : tst_Watchdog::initTestCase()
+QFATAL : tst_Watchdog::delay() Test function timed out
+FAIL! : tst_Watchdog::delay() Received a fatal error.
+ Loc: [Unknown file(0)]
+Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms
+********* Finished testing of tst_Watchdog *********
diff --git a/tests/auto/testlib/selftests/expected_watchdog.xml b/tests/auto/testlib/selftests/expected_watchdog.xml
new file mode 100644
index 0000000000..f1642fba79
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_watchdog.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestCase name="tst_Watchdog">
+<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="delay">
+<Message type="qfatal" file="" line="0">
+ <Description><![CDATA[Test function timed out]]></Description>
+</Message>
+<Incident type="fail" file="Unknown file" line="0">
+ <Description><![CDATA[Received a fatal error.]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
+</TestCase>
diff --git a/tests/auto/testlib/selftests/expected_watchdog.xunitxml b/tests/auto/testlib/selftests/expected_watchdog.xunitxml
new file mode 100644
index 0000000000..7e16ab2c34
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_watchdog.xunitxml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite errors="1" failures="1" tests="2" name="tst_Watchdog">
+ <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="fail" name="delay">
+ <!-- message="Test function timed out" type="qfatal" -->
+ <failure message="Received a fatal error." result="fail"/>
+ </testcase>
+ <system-err>
+<![CDATA[Test function timed out]]>
+ </system-err>
+</testsuite>
diff --git a/tests/auto/testlib/selftests/expectfail/expectfail.pro b/tests/auto/testlib/selftests/expectfail/expectfail.pro
index c1849990f2..db383bee6a 100644
--- a/tests/auto/testlib/selftests/expectfail/expectfail.pro
+++ b/tests/auto/testlib/selftests/expectfail/expectfail.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = expectfail
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/failcleanup/failcleanup.pro b/tests/auto/testlib/selftests/failcleanup/failcleanup.pro
index 426d7cc45b..12da5920fb 100644
--- a/tests/auto/testlib/selftests/failcleanup/failcleanup.pro
+++ b/tests/auto/testlib/selftests/failcleanup/failcleanup.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = failcleanup
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/faildatatype/BLACKLIST b/tests/auto/testlib/selftests/faildatatype/BLACKLIST
new file mode 100644
index 0000000000..bb1cae98e5
--- /dev/null
+++ b/tests/auto/testlib/selftests/faildatatype/BLACKLIST
@@ -0,0 +1,4 @@
+# See qtbase/src/testlib/qtestblacklist.cpp for format
+# Incidental test: exercise more of the blacklisting code
+[value:bool-as-string]
+*
diff --git a/tests/auto/testlib/selftests/faildatatype/faildatatype.pro b/tests/auto/testlib/selftests/faildatatype/faildatatype.pro
new file mode 100644
index 0000000000..4ff7352555
--- /dev/null
+++ b/tests/auto/testlib/selftests/faildatatype/faildatatype.pro
@@ -0,0 +1,9 @@
+SOURCES += tst_faildatatype.cpp
+QT = core testlib
+
+darwin: CONFIG -= app_bundle
+CONFIG -= debug_and_release_target
+
+TARGET = faildatatype
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/faildatatype/tst_faildatatype.cpp b/tests/auto/testlib/selftests/faildatatype/tst_faildatatype.cpp
new file mode 100644
index 0000000000..b49c7723ef
--- /dev/null
+++ b/tests/auto/testlib/selftests/faildatatype/tst_faildatatype.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** 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/QtTest>
+
+class tst_FailDataType: public QObject
+{
+Q_OBJECT
+private slots:
+ void value_data() const;
+ void value() const;
+};
+
+void tst_FailDataType::value_data() const
+{
+ QTest::addColumn<QString>("value");
+
+ QTest::newRow("bool-as-string") << true; // assertion should fail here
+}
+
+/*! \internal
+ This function should never be run because its _data() fails.
+ */
+void tst_FailDataType::value() const
+{
+ QFAIL("ERROR: this function is NOT supposed to be run.");
+}
+
+QTEST_APPLESS_MAIN(tst_FailDataType)
+
+#include "tst_faildatatype.moc"
diff --git a/tests/auto/testlib/selftests/failfetchtype/BLACKLIST b/tests/auto/testlib/selftests/failfetchtype/BLACKLIST
new file mode 100644
index 0000000000..20a502724a
--- /dev/null
+++ b/tests/auto/testlib/selftests/failfetchtype/BLACKLIST
@@ -0,0 +1,4 @@
+# See qtbase/src/testlib/qtestblacklist.cpp for format
+# Incidental test: exercise more of the blacklisting code
+[fetch:no-such-dataset]
+*
diff --git a/tests/auto/testlib/selftests/failfetchtype/failfetchtype.pro b/tests/auto/testlib/selftests/failfetchtype/failfetchtype.pro
new file mode 100644
index 0000000000..5821018af4
--- /dev/null
+++ b/tests/auto/testlib/selftests/failfetchtype/failfetchtype.pro
@@ -0,0 +1,9 @@
+SOURCES += tst_failfetchtype.cpp
+QT = core testlib
+
+darwin: CONFIG -= app_bundle
+CONFIG -= debug_and_release_target
+
+TARGET = failfetchtype
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/failfetchtype/tst_failfetchtype.cpp b/tests/auto/testlib/selftests/failfetchtype/tst_failfetchtype.cpp
new file mode 100644
index 0000000000..2dd32a5a5e
--- /dev/null
+++ b/tests/auto/testlib/selftests/failfetchtype/tst_failfetchtype.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** 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/QtTest>
+
+class tst_FailFetchType: public QObject
+{
+Q_OBJECT
+private slots:
+ void fetch_data() const;
+ void fetch() const;
+};
+
+void tst_FailFetchType::fetch_data() const
+{
+ QTest::addColumn<bool>("value");
+
+ QTest::newRow("bool") << true;
+}
+
+void tst_FailFetchType::fetch() const
+{
+ QFETCH(QString, value); // assertion should fail here
+ QFAIL("ERROR: this function is NOT supposed to be run.");
+}
+
+QTEST_APPLESS_MAIN(tst_FailFetchType)
+
+#include "tst_failfetchtype.moc"
diff --git a/tests/auto/testlib/selftests/failinit/failinit.pro b/tests/auto/testlib/selftests/failinit/failinit.pro
index 6a30a5af68..46b1c3a6c4 100644
--- a/tests/auto/testlib/selftests/failinit/failinit.pro
+++ b/tests/auto/testlib/selftests/failinit/failinit.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = failinit
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/failinitdata/failinitdata.pro b/tests/auto/testlib/selftests/failinitdata/failinitdata.pro
index b608c67dbb..63b32cb6d6 100644
--- a/tests/auto/testlib/selftests/failinitdata/failinitdata.pro
+++ b/tests/auto/testlib/selftests/failinitdata/failinitdata.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = failinitdata
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro b/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro
index 33b306ca75..0fbb5e4c00 100644
--- a/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro
+++ b/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = fetchbogus
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/findtestdata/findtestdata.pro b/tests/auto/testlib/selftests/findtestdata/findtestdata.pro
index f04a640c59..7fbdaea3a3 100644
--- a/tests/auto/testlib/selftests/findtestdata/findtestdata.pro
+++ b/tests/auto/testlib/selftests/findtestdata/findtestdata.pro
@@ -7,3 +7,5 @@ CONFIG -= debug_and_release_target
RESOURCES = findtestdata.qrc
TARGET = findtestdata
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/float/float.pro b/tests/auto/testlib/selftests/float/float.pro
index 95980eeac8..479eb152c5 100644
--- a/tests/auto/testlib/selftests/float/float.pro
+++ b/tests/auto/testlib/selftests/float/float.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = float
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/float/tst_float.cpp b/tests/auto/testlib/selftests/float/tst_float.cpp
index babb588f4b..49d00ac0e0 100644
--- a/tests/auto/testlib/selftests/float/tst_float.cpp
+++ b/tests/auto/testlib/selftests/float/tst_float.cpp
@@ -27,6 +27,7 @@
****************************************************************************/
#include <QtCore/QCoreApplication>
+#include <QtCore/qfloat16.h>
#include <QtTest/QtTest>
#include <QDebug>
@@ -39,6 +40,8 @@ private slots:
void doubleComparisons_data() const;
void floatComparisons() const;
void floatComparisons_data() const;
+ void float16Comparisons() const;
+ void float16Comparisons_data() const;
void compareFloatTests() const;
void compareFloatTests_data() const;
};
@@ -189,6 +192,42 @@ void tst_float::floatComparisons_data() const
}
}
+void tst_float::float16Comparisons() const
+{
+ QFETCH(qfloat16, operandLeft);
+ QFETCH(qfloat16, operandRight);
+
+ QCOMPARE(operandLeft, operandRight);
+}
+
+void tst_float::float16Comparisons_data() const
+{
+ QTest::addColumn<qfloat16>("operandLeft");
+ QTest::addColumn<qfloat16>("operandRight");
+
+ QTest::newRow("should SUCCEED 1")
+ << qfloat16(0)
+ << qfloat16(0);
+
+ QTest::newRow("should FAIL 1")
+ << qfloat16(1.000)
+ << qfloat16(3.000);
+
+ QTest::newRow("should FAIL 2")
+ << qfloat16(1.000e-4f)
+ << qfloat16(3.000e-4f);
+
+ // QCOMPARE for qfloat16s uses qFuzzyCompare()
+
+ QTest::newRow("should FAIL 3")
+ << qfloat16(98)
+ << qfloat16(99);
+
+ QTest::newRow("should SUCCEED 2")
+ << qfloat16(1001)
+ << qfloat16(1002);
+}
+
void tst_float::compareFloatTests() const
{
QFETCH(float, t1);
diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py
index 111870b3fb..9ec87c8fc6 100755
--- a/tests/auto/testlib/selftests/generate_expected_output.py
+++ b/tests/auto/testlib/selftests/generate_expected_output.py
@@ -221,8 +221,71 @@ class Scanner (object):
print('tst_selftests.cpp names', d, "as a test, but it doesn't exist")
del re
+# Keep in sync with tst_selftests.cpp's processEnvironment():
+def baseEnv(platname=None,
+ keep=('PATH', 'QT_QPA_PLATFORM'),
+ posix=('HOME', 'USER', 'QEMU_SET_ENV', 'QEMU_LD_PREFIX'),
+ nonapple=('DISPLAY', 'XAUTHLOCALHOSTNAME'), # and XDG_*
+ # Don't actually know how to test for QNX, so this is ignored:
+ qnx=('GRAPHICS_ROOT', 'TZ'),
+ # Probably not actually relevant
+ preserveLib=('QT_PLUGIN_PATH', 'LD_LIBRARY_PATH'),
+ # Shall be modified on first call (a *copy* is returned):
+ cached={}):
+ """Lazily-evaluated standard environment for sub-tests to run in.
+
+ This prunes the parent process environment, selecting a only those
+ variables we chose to keep. The platname passed to the first call
+ helps select which variables to keep. The environment computed
+ then is cached: a copy of this is returned on that call and each
+ subsequent call.\n"""
+
+ if not cached:
+ xdg = False
+ # The platform module may be more apt for the platform tests here.
+ if os.name == 'posix':
+ keep += posix
+ if platname != 'darwin':
+ keep += nonapple
+ xdg = True
+ if 'QT_PRESERVE_TESTLIB_PATH' in os.environ:
+ keep += preserveLib
+
+ cached = dict(
+ LC_ALL = 'C', # Use standard locale
+ # Avoid interference from any qtlogging.ini files, e.g. in
+ # /etc/xdg/QtProject/, (must match tst_selftests.cpp's
+ # processEnvironment()'s value):
+ QT_LOGGING_RULES = '*.debug=true;qt.*=false')
+
+ for k, v in os.environ.items():
+ if k in keep or (xdg and k.startswith('XDG_')):
+ cached[k] = v
+
+ return cached.copy()
+
+def testEnv(testname,
+ # Make sure this matches tst_Selftests::doRunSubTest():
+ extraEnv = {
+ "crashers": { "QTEST_DISABLE_CORE_DUMP": "1",
+ "QTEST_DISABLE_STACK_DUMP": "1" },
+ "watchdog": { "QTEST_FUNCTION_TIMEOUT": "100" },
+ },
+ # Must match tst_Selftests::runSubTest_data():
+ crashers = ("assert", "blacklisted", "crashes", "crashedterminate",
+ "exceptionthrow", "faildatatype", "failfetchtype",
+ "fetchbogus", "silent", "watchdog")):
+ """Determine the environment in which to run a test."""
+ data = baseEnv()
+ if testname in crashers:
+ data.update(extraEnv["crashers"])
+ if testname in extraEnv:
+ data.update(extraEnv[testname])
+ return data
+
def generateTestData(testname, clean,
formats = ('xml', 'txt', 'xunitxml', 'lightxml', 'teamcity', 'tap'),
+ # Make sure this matches tst_Selftests::runSubTest_data():
extraArgs = {
"commandlinedata": "fiveTablePasses fiveTablePasses:fiveTablePasses_data1 -v2",
"benchlibcallgrind": "-callgrind",
@@ -249,26 +312,22 @@ def generateTestData(testname, clean,
print("Warning: directory", testname, "contains no test executable")
return
+ # Prepare environment in which to run tests:
+ env = testEnv(testname)
+
print(" running", testname)
for format in formats:
cmd = [path, '-' + format]
if testname in extraArgs:
cmd += extraArgs[testname].split()
- data = subprocess.Popen(cmd, stdout=subprocess.PIPE,
+ data = subprocess.Popen(cmd, stdout=subprocess.PIPE, env=env,
universal_newlines=True).communicate()[0]
with open('expected_' + testname + '.' + format, 'w') as out:
out.write('\n'.join(clean(data))) # write() appends a newline, too
def main(name, *args):
"""Minimal argument parsing and driver for the real work"""
- os.environ.update(
- LC_ALL = 'C', # Use standard locale
- # Avoid interference from any qtlogging.ini files, e.g. in
- # /etc/xdg/QtProject/, (must match tst_selftests.cpp's
- # processEnvironment()'s value):
- QT_LOGGING_RULES = '*.debug=true;qt.*=false')
-
herePath = os.getcwd()
cleaner = Cleaner(herePath, name)
@@ -280,6 +339,7 @@ def main(name, *args):
if __name__ == '__main__':
# Executed when script is run, not when imported (e.g. to debug)
import sys
+ baseEnv(sys.platform) # initializes its cache
if sys.platform.startswith('win'):
print("This script does not work on Windows.")
diff --git a/tests/auto/testlib/selftests/globaldata/globaldata.pro b/tests/auto/testlib/selftests/globaldata/globaldata.pro
index c0b1554c0f..621416c5b8 100644
--- a/tests/auto/testlib/selftests/globaldata/globaldata.pro
+++ b/tests/auto/testlib/selftests/globaldata/globaldata.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = globaldata
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/keyboard/keyboard.pro b/tests/auto/testlib/selftests/keyboard/keyboard.pro
index 0097318797..488c992e62 100644
--- a/tests/auto/testlib/selftests/keyboard/keyboard.pro
+++ b/tests/auto/testlib/selftests/keyboard/keyboard.pro
@@ -5,3 +5,5 @@ macos:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = keyboard
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/longstring/longstring.pro b/tests/auto/testlib/selftests/longstring/longstring.pro
index d16ba85095..d8961203f3 100644
--- a/tests/auto/testlib/selftests/longstring/longstring.pro
+++ b/tests/auto/testlib/selftests/longstring/longstring.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = longstring
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro b/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro
index 79451af1ec..bdca0225d3 100644
--- a/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro
+++ b/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = maxwarnings
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/mouse/mouse.pro b/tests/auto/testlib/selftests/mouse/mouse.pro
index 7c06b8aa64..e5701eee0f 100644
--- a/tests/auto/testlib/selftests/mouse/mouse.pro
+++ b/tests/auto/testlib/selftests/mouse/mouse.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = mouse
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/multiexec/multiexec.pro b/tests/auto/testlib/selftests/multiexec/multiexec.pro
index 2038acbd31..e9b2b7b587 100644
--- a/tests/auto/testlib/selftests/multiexec/multiexec.pro
+++ b/tests/auto/testlib/selftests/multiexec/multiexec.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = multiexec
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/pairdiagnostics/pairdiagnostics.pro b/tests/auto/testlib/selftests/pairdiagnostics/pairdiagnostics.pro
index 1c07c93e9d..25f5bfe809 100644
--- a/tests/auto/testlib/selftests/pairdiagnostics/pairdiagnostics.pro
+++ b/tests/auto/testlib/selftests/pairdiagnostics/pairdiagnostics.pro
@@ -4,3 +4,5 @@ QT = core testlib
CONFIG -= app_bundle debug_and_release_target
TARGET = pairdiagnostics
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/printdatatags/printdatatags.pro b/tests/auto/testlib/selftests/printdatatags/printdatatags.pro
index cd06384835..83f171aac5 100644
--- a/tests/auto/testlib/selftests/printdatatags/printdatatags.pro
+++ b/tests/auto/testlib/selftests/printdatatags/printdatatags.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = printdatatags
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro b/tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro
index f1cf25d104..00ca4a0e62 100644
--- a/tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro
+++ b/tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = printdatatagswithglobaltags
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro b/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro
index bd967f32e6..4d7af8ab40 100644
--- a/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro
+++ b/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = qexecstringlist
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/selftests.pri b/tests/auto/testlib/selftests/selftests.pri
index 05ed6d9905..b4568dd3e1 100644
--- a/tests/auto/testlib/selftests/selftests.pri
+++ b/tests/auto/testlib/selftests/selftests.pri
@@ -21,6 +21,8 @@ SUBPROGRAMS = \
exceptionthrow \
expectfail \
failcleanup \
+ faildatatype \
+ failfetchtype \
failinit \
failinitdata \
fetchbogus \
@@ -43,11 +45,13 @@ SUBPROGRAMS = \
sleep \
strcmp \
subtest \
+ testlib \
tuplediagnostics \
verbose1 \
verbose2 \
verifyexceptionthrown \
warnings \
+ watchdog \
xunit
qtHaveModule(gui): SUBPROGRAMS += \
diff --git a/tests/auto/testlib/selftests/silent/silent.pro b/tests/auto/testlib/selftests/silent/silent.pro
index 3150f65a5e..3f6325a010 100644
--- a/tests/auto/testlib/selftests/silent/silent.pro
+++ b/tests/auto/testlib/selftests/silent/silent.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = silent
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/singleskip/singleskip.pro b/tests/auto/testlib/selftests/singleskip/singleskip.pro
index 9f63e62747..a32c22c943 100644
--- a/tests/auto/testlib/selftests/singleskip/singleskip.pro
+++ b/tests/auto/testlib/selftests/singleskip/singleskip.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = singleskip
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/skip/skip.pro b/tests/auto/testlib/selftests/skip/skip.pro
index 8780d295cf..19a01908af 100644
--- a/tests/auto/testlib/selftests/skip/skip.pro
+++ b/tests/auto/testlib/selftests/skip/skip.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = skip
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro b/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro
index f98cda7596..059132b5a6 100644
--- a/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro
+++ b/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = skipcleanup
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/skipinit/skipinit.pro b/tests/auto/testlib/selftests/skipinit/skipinit.pro
index 7defce9a52..6605226993 100644
--- a/tests/auto/testlib/selftests/skipinit/skipinit.pro
+++ b/tests/auto/testlib/selftests/skipinit/skipinit.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = skipinit
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro b/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro
index cd806c2a43..176955500b 100644
--- a/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro
+++ b/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = skipinitdata
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/sleep/sleep.pro b/tests/auto/testlib/selftests/sleep/sleep.pro
index affcba22ee..b109bf6253 100644
--- a/tests/auto/testlib/selftests/sleep/sleep.pro
+++ b/tests/auto/testlib/selftests/sleep/sleep.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = sleep
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/strcmp/strcmp.pro b/tests/auto/testlib/selftests/strcmp/strcmp.pro
index f5f6eecc88..35a4c5e858 100644
--- a/tests/auto/testlib/selftests/strcmp/strcmp.pro
+++ b/tests/auto/testlib/selftests/strcmp/strcmp.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = strcmp
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/subtest/subtest.pro b/tests/auto/testlib/selftests/subtest/subtest.pro
index 09dee1b1b9..b5c294aed6 100644
--- a/tests/auto/testlib/selftests/subtest/subtest.pro
+++ b/tests/auto/testlib/selftests/subtest/subtest.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = subtest
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/test/test.pro b/tests/auto/testlib/selftests/test/test.pro
index ec1633ebff..fce8e48ca2 100644
--- a/tests/auto/testlib/selftests/test/test.pro
+++ b/tests/auto/testlib/selftests/test/test.pro
@@ -19,3 +19,4 @@ RESOURCES += expected_files
include(../selftests.pri)
!android:!winrt: for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../$${file}/$${file}"
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/testlib/testlib.pro b/tests/auto/testlib/selftests/testlib/testlib.pro
new file mode 100644
index 0000000000..8798f86b18
--- /dev/null
+++ b/tests/auto/testlib/selftests/testlib/testlib.pro
@@ -0,0 +1,9 @@
+SOURCES += tst_testlib.cpp
+QT = core testlib
+
+darwin: CONFIG -= app_bundle
+CONFIG -= debug_and_release_target
+
+TARGET = testlib
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/testlib/tst_testlib.cpp b/tests/auto/testlib/selftests/testlib/tst_testlib.cpp
new file mode 100644
index 0000000000..38a71be732
--- /dev/null
+++ b/tests/auto/testlib/selftests/testlib/tst_testlib.cpp
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** 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/QtTest>
+#include <QtCore/QtMath>
+#include <QtCore/QtNumeric>
+
+/* Test QTest functions not covered by other parts of the selftest. Tests that
+ * involve crashing or exiting should be added as separate tests in their own
+ * right. Tests that form a coherent group on a related theme should also go in
+ * their own directory. Tests that fail in order to exercise QTest internals
+ * are fine.
+ */
+
+class tst_TestLib : public QObject
+{
+Q_OBJECT
+private slots:
+ void basics() const;
+ void delays() const;
+ void reals_data() const;
+ void reals() const;
+};
+
+void tst_TestLib::basics() const
+{
+ QVERIFY(QByteArray(QTest::currentAppName()).contains("testlib"));
+
+ QCOMPARE(QTest::testObject(), nullptr); // last, because it should fail
+}
+
+QT_BEGIN_NAMESPACE
+
+namespace QTest {
+ // Defined; not declared in the public header, but used by qtdeclarative.
+ int defaultKeyDelay();
+ int defaultMouseDelay();
+}
+
+QT_END_NAMESPACE
+
+void tst_TestLib::delays() const
+{
+ QVERIFY(QTest::defaultMouseDelay() >= 0);
+ QVERIFY(QTest::defaultKeyDelay() >= 0);
+}
+
+void tst_TestLib::reals_data() const
+{
+ QTest::addColumn<double>("actual");
+ QTest::addColumn<double>("expected");
+
+ QTest::newRow("zero") << 0.0 << 0.0;
+#define ADDROW(func) QTest::addRow("self-%s", #func) << func() << func()
+ ADDROW(qQNaN);
+ ADDROW(qInf);
+#undef ADDROW // Just used so as to exercise addRow()
+ QTest::newRow("infineg") << -qInf() << -qInf();
+ QTest::newRow("Sin(turn/4)") << qSin(9 * M_PI_2) << 1.0;
+ QTest::newRow("Cos(turn/2)") << qCos(15 * M_PI) << -1.0;
+}
+
+void tst_TestLib::reals() const
+{
+ QFETCH(double, actual);
+ QFETCH(double, expected);
+ QCOMPARE(actual, expected);
+}
+
+QTEST_APPLESS_MAIN(tst_TestLib)
+
+#include "tst_testlib.moc"
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index 8baca5bdad..3ef15b9261 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -468,10 +468,13 @@ void tst_Selftests::runSubTest_data()
#endif
<< "expectfail"
<< "failcleanup"
+#ifndef Q_OS_WIN // these assert, by design; so same problem as "assert"
+ << "faildatatype"
+ << "failfetchtype"
+#endif
<< "failinit"
<< "failinitdata"
-#if !defined(Q_OS_WIN)
- // Disable this test on Windows, as the run-time will popup dialogs with warnings
+#ifndef Q_OS_WIN // asserts, by design; so same problem as "assert"
<< "fetchbogus"
#endif
<< "findtestdata"
@@ -494,6 +497,7 @@ void tst_Selftests::runSubTest_data()
<< "sleep"
<< "strcmp"
<< "subtest"
+ << "testlib"
<< "tuplediagnostics"
<< "verbose1"
<< "verbose2"
@@ -502,6 +506,7 @@ void tst_Selftests::runSubTest_data()
<< "verifyexceptionthrown"
#endif //!QT_NO_EXCEPTIONS
<< "warnings"
+ << "watchdog"
<< "xunit"
;
@@ -520,6 +525,7 @@ void tst_Selftests::runSubTest_data()
foreach (QString const& subtest, tests) {
QStringList arguments = loggerSet.arguments;
+ // Keep in sync with generateTestData()'s extraArgs in generate_expected_output.py:
if (subtest == "commandlinedata") {
arguments << QString("fiveTablePasses fiveTablePasses:fiveTablePasses_data1 -v2").split(' ');
}
@@ -612,10 +618,12 @@ void tst_Selftests::runSubTest_data()
if (loggerSet.name.contains("teamcity") && subtest.startsWith("benchlib"))
continue; // Skip benchmark for TeamCity logger
+ // Keep in sync with generateTestData()'s crashers in generate_expected_output.py:
const bool crashes = subtest == QLatin1String("assert") || subtest == QLatin1String("exceptionthrow")
|| subtest == QLatin1String("fetchbogus") || subtest == QLatin1String("crashedterminate")
+ || subtest == QLatin1String("faildatatype") || subtest == QLatin1String("failfetchtype")
|| subtest == QLatin1String("crashes") || subtest == QLatin1String("silent")
- || subtest == QLatin1String("blacklisted");
+ || subtest == QLatin1String("blacklisted") || subtest == QLatin1String("watchdog");
QTest::newRow(qPrintable(QString("%1 %2").arg(subtest).arg(loggerSet.name)))
<< subtest
<< loggers
@@ -690,9 +698,12 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
QProcess proc;
QProcessEnvironment environment = processEnvironment();
+ // Keep in sync with generateTestData()'s extraEnv in generate_expected_output.py:
if (crashes) {
environment.insert("QTEST_DISABLE_CORE_DUMP", "1");
environment.insert("QTEST_DISABLE_STACK_DUMP", "1");
+ if (subdir == QLatin1String("watchdog"))
+ environment.insert("QTEST_FUNCTION_TIMEOUT", "100");
}
proc.setProcessEnvironment(environment);
const QString path = subdir + QLatin1Char('/') + subdir;
@@ -735,6 +746,7 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
if (subdir != QLatin1String("exceptionthrow")
&& subdir != QLatin1String("cmptest") // QImage comparison requires QGuiApplication
&& subdir != QLatin1String("fetchbogus")
+ && subdir != QLatin1String("watchdog")
&& subdir != QLatin1String("xunit")
#ifdef Q_CC_MINGW
&& subdir != QLatin1String("blacklisted") // calls qFatal()
@@ -742,11 +754,13 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
#endif
#ifdef Q_OS_LINUX
// QEMU outputs to stderr about uncaught signals
- && (!EmulationDetector::isRunningArmOnX86() ||
- (subdir != QLatin1String("blacklisted")
- && subdir != QLatin1String("silent")
- && subdir != QLatin1String("assert")
- && subdir != QLatin1String("crashes")
+ && !(EmulationDetector::isRunningArmOnX86() &&
+ (subdir == QLatin1String("assert")
+ || subdir == QLatin1String("blacklisted")
+ || subdir == QLatin1String("crashes")
+ || subdir == QLatin1String("faildatatype")
+ || subdir == QLatin1String("failfetchtype")
+ || subdir == QLatin1String("silent")
)
)
#endif
@@ -887,16 +901,20 @@ bool tst_Selftests::compareLine(const QString &logger, const QString &subdir,
const QString &actualLine, const QString &expectedLine,
QString *errorMessage) const
{
- if (subdir == QLatin1String("assert") && actualLine.contains(QLatin1String("ASSERT: "))
- && expectedLine.contains(QLatin1String("ASSERT: ")) && actualLine != expectedLine) {
+ if (actualLine == expectedLine)
+ return true;
+
+ if ((subdir == QLatin1String("assert")
+ || subdir == QLatin1String("faildatatype") || subdir == QLatin1String("failfetchtype"))
+ && actualLine.contains(QLatin1String("ASSERT: "))
+ && expectedLine.contains(QLatin1String("ASSERT: "))) {
// 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;
}
- if (expectedLine.startsWith(QLatin1String("FAIL! : tst_Exception::throwException() Caught unhandled exce"))
- && actualLine != expectedLine) {
+ if (expectedLine.startsWith(QLatin1String("FAIL! : tst_Exception::throwException() Caught unhandled exce"))) {
// 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);
@@ -935,9 +953,6 @@ bool tst_Selftests::compareLine(const QString &logger, const QString &subdir,
if (actualLine.startsWith(QLatin1String("Totals:")) && expectedLine.startsWith(QLatin1String("Totals:")))
return true;
- if (actualLine == expectedLine)
- return true;
-
*errorMessage = msgMismatch(actualLine, expectedLine);
return false;
}
diff --git a/tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro b/tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro
index 7a29e0e5e1..f338170b81 100644
--- a/tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro
+++ b/tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro
@@ -4,3 +4,5 @@ QT = core testlib
CONFIG -= app_bundle debug_and_release_target
TARGET = tuplediagnostics
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/verbose1/verbose1.pro b/tests/auto/testlib/selftests/verbose1/verbose1.pro
index f00ae69d17..1f16d70d66 100644
--- a/tests/auto/testlib/selftests/verbose1/verbose1.pro
+++ b/tests/auto/testlib/selftests/verbose1/verbose1.pro
@@ -8,3 +8,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = verbose1
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/verbose2/verbose2.pro b/tests/auto/testlib/selftests/verbose2/verbose2.pro
index 796cdeb975..bf54904488 100644
--- a/tests/auto/testlib/selftests/verbose2/verbose2.pro
+++ b/tests/auto/testlib/selftests/verbose2/verbose2.pro
@@ -8,3 +8,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = verbose2
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro b/tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro
index 51f108c9d7..198d35dc6c 100644
--- a/tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro
+++ b/tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro
@@ -6,3 +6,5 @@ CONFIG -= debug_and_release_target
CONFIG += exceptions
TARGET = verifyexceptionthrown
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/warnings/warnings.pro b/tests/auto/testlib/selftests/warnings/warnings.pro
index 0c6cddcefb..a0bd2c62ba 100644
--- a/tests/auto/testlib/selftests/warnings/warnings.pro
+++ b/tests/auto/testlib/selftests/warnings/warnings.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = warnings
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/watchdog/tst_watchdog.cpp b/tests/auto/testlib/selftests/watchdog/tst_watchdog.cpp
new file mode 100644
index 0000000000..2f29609f71
--- /dev/null
+++ b/tests/auto/testlib/selftests/watchdog/tst_watchdog.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** 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/QtTest>
+
+class tst_Watchdog : public QObject
+{
+ Q_OBJECT
+private slots:
+ void delay() const;
+};
+
+void tst_Watchdog::delay() const
+{
+ bool ok = false;
+ const int fiveMinutes = 5 * 60 * 1000;
+ // Use the same env.var as the watch-dog and add a little to it:
+ const int timeout = qEnvironmentVariableIntValue("QTEST_FUNCTION_TIMEOUT", &ok);
+ QTest::qSleep(5000 + (ok && timeout > 0 ? timeout : fiveMinutes));
+ // The watchdog timer should have interrupted us by now.
+ QFAIL("ERROR: this function should be interrupted.");
+}
+
+QTEST_APPLESS_MAIN(tst_Watchdog)
+
+#include "tst_watchdog.moc"
diff --git a/tests/auto/testlib/selftests/watchdog/watchdog.pro b/tests/auto/testlib/selftests/watchdog/watchdog.pro
new file mode 100644
index 0000000000..ddcc3f6ca2
--- /dev/null
+++ b/tests/auto/testlib/selftests/watchdog/watchdog.pro
@@ -0,0 +1,14 @@
+SOURCES += tst_watchdog.cpp
+QT = core testlib
+
+darwin: CONFIG -= app_bundle
+CONFIG -= debug_and_release_target
+
+TARGET = watchdog
+
+# The test deliberately times out; so tell it to do so quickly
+checkenv.name = QTEST_FUNCTION_TIMEOUT
+checkenv.value = 100
+QT_TOOL_ENV += checkenv
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/xunit/xunit.pro b/tests/auto/testlib/selftests/xunit/xunit.pro
index b8c606e828..becb46ce8b 100644
--- a/tests/auto/testlib/selftests/xunit/xunit.pro
+++ b/tests/auto/testlib/selftests/xunit/xunit.pro
@@ -6,3 +6,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = xunit
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/testlib.pro b/tests/auto/testlib/testlib.pro
index 25ccc591d6..587c76a189 100644
--- a/tests/auto/testlib/testlib.pro
+++ b/tests/auto/testlib/testlib.pro
@@ -1,6 +1,7 @@
-TEMPLATE=subdirs
-SUBDIRS=\
+TEMPLATE = subdirs
+SUBDIRS = \
+ outformat \
qsignalspy \
selftests \
-qtHaveModule(widgets):SUBDIRS += qabstractitemmodeltester
+qtHaveModule(widgets): SUBDIRS += qabstractitemmodeltester