diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-05-04 11:33:10 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-05-04 17:38:40 +0200 |
commit | 0f7987f0c934b311bd39a5a496ffb0c6128eb8df (patch) | |
tree | dea392deb3c43e377a224271c4f450dcff3fc76f /tests/auto | |
parent | ea7d85457d30e915ad470919d2e74867cba9cad8 (diff) | |
parent | f0ea852d4dd6b3139869a952ee92e74cd367866d (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
src/corelib/text/qlocale.cpp
src/network/access/qnetworkaccessmanager.cpp
Regenerated tests/auto/testlib/selftests/float/CMakeLists.txt
Change-Id: I5a8ae42511380ca49a38b13c6fa8a3c5df8bed01
Diffstat (limited to 'tests/auto')
15 files changed, 510 insertions, 239 deletions
diff --git a/tests/auto/corelib/serialization/json/tst_qtjson.cpp b/tests/auto/corelib/serialization/json/tst_qtjson.cpp index a167612b52..cfe70932b3 100644 --- a/tests/auto/corelib/serialization/json/tst_qtjson.cpp +++ b/tests/auto/corelib/serialization/json/tst_qtjson.cpp @@ -987,9 +987,16 @@ void tst_QtJson::testObjectIteration() QCOMPARE(object, object2); QJsonObject::iterator it = object2.find(QString::number(5)); + QJsonValue val = *it; object2.erase(it); QCOMPARE(object.size(), 10); QCOMPARE(object2.size(), 9); + + for (QJsonObject::const_iterator it = object2.constBegin(); it != object2.constEnd(); ++it) { + QJsonValue value = it.value(); + QVERIFY(it.value() != val); + QCOMPARE((double)it.key().toInt(), value.toDouble()); + } } { diff --git a/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp b/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp index 64321c11fa..9c1341e252 100644 --- a/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp +++ b/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp @@ -106,6 +106,8 @@ private slots: void fromCborStreamReaderIODevice(); void validation_data(); void validation(); + void extendedTypeValidation_data(); + void extendedTypeValidation(); void hugeDeviceValidation_data(); void hugeDeviceValidation(); void recursionLimit_data(); @@ -118,6 +120,84 @@ private slots: void streamVariantSerialization(); }; +namespace SimpleEncodeToCbor { +inline size_t lengthOf(int) +{ + return 1; // encode as byte +} + +template <unsigned N> inline size_t lengthOf(const char (&)[N]) +{ + return N - 1; +} + + +inline size_t lengthOf(const char *str) +{ + return strlen(str); +} + +template <typename T> inline size_t lengthOf(T) +{ + return sizeof(T); +} + +static void encodeOneAt(char *ptr, int v, size_t) +{ + // encode as byte + *ptr = char(v); +} + +static void encodeOneAt(char *ptr, const char *v, size_t size) +{ + memcpy(ptr, v, size); +} + +template <typename T> +static typename std::enable_if<std::is_unsigned<T>::value>::type +encodeOneAt(char *ptr, T v, size_t) +{ + qToBigEndian(v, ptr); +} + +template <typename T> +static typename std::enable_if<std::is_floating_point<T>::value || + std::is_same<T, qfloat16>::value>::type +encodeOneAt(char *ptr, T v, size_t) +{ + typename QIntegerForSizeof<T>::Unsigned u; + memcpy(&u, &v, sizeof(u)); + qToBigEndian(u, ptr); +} + +static char *encodeAt(char *ptr) +{ + return ptr; +} + +template <typename Arg0, typename... Args> +static char *encodeAt(char *ptr, Arg0 a0, Args... a) +{ + encodeOneAt(ptr, a0, lengthOf(a0)); + return encodeAt(ptr + lengthOf(a0), a...); +} + +} // namespace SimpleEncodetoCbor + +template <typename... Args> +static QByteArray encode(Args... a) +{ + // this would be much easier with C++17 fold expressions... + using namespace SimpleEncodeToCbor; + using namespace std; + size_t lengths[] = { lengthOf(a)... }; + size_t total = accumulate(begin(lengths), end(lengths), size_t(0), plus<size_t>{}); + QByteArray result(QByteArray::size_type(total), Qt::Uninitialized); + char *ptr = result.data(); + encodeAt(ptr, a...); + return result; +} + // Get the validation data from TinyCBOR (see src/3rdparty/tinycbor/tests/parser/data.cpp) #include "data.cpp" @@ -1714,6 +1794,15 @@ void tst_QCborValue::fromCbor_data() QTest::newRow("DateTime:NoMilli") << QCborValue(QDateTime::fromSecsSinceEpoch(1515565477, Qt::UTC)) << raw("\xc0\x74" "2018-01-10T06:24:37Z"); + // date-only is only permitted local time + QTest::newRow("DateTime:NoTime:Local") << QCborValue(QDateTime(QDate(2020, 4, 15), QTime(0, 0), Qt::LocalTime)) + << raw("\xc0\x6a" "2020-04-15"); + QTest::newRow("DateTime:24:00:00") << QCborValue(QDateTime(QDate(2020, 4, 16), QTime(0, 0), Qt::UTC)) + << raw("\xc0\x74" "2020-04-15T24:00:00Z"); + QTest::newRow("DateTime:+00:00") << QCborValue(QDateTime::fromMSecsSinceEpoch(1515565477125, Qt::UTC)) + << raw("\xc0\x78\x1d" "2018-01-10T06:24:37.125+00:00"); + QTest::newRow("DateTime:+01:00") << QCborValue(QDateTime::fromMSecsSinceEpoch(1515565477125, Qt::OffsetFromUTC, 60*60)) + << raw("\xc0\x78\x1d" "2018-01-10T07:24:37.125+01:00"); QTest::newRow("UnixTime_t:Integer") << QCborValue(QDateTime::fromSecsSinceEpoch(1515565477, Qt::UTC)) << raw("\xc1\x1a\x5a\x55\xb1\xa5"); QTest::newRow("UnixTime_t:Double") << QCborValue(QDateTime::fromMSecsSinceEpoch(1515565477125, Qt::UTC)) @@ -1882,6 +1971,117 @@ void tst_QCborValue::validation() } } +void tst_QCborValue::extendedTypeValidation_data() +{ + QTest::addColumn<QByteArray>("data"); + QTest::addColumn<QCborValue>("expected"); + + // QDateTime currently stores time in milliseconds, so make sure + // we don't overflow + { + quint64 limit = std::numeric_limits<quint64>::max() / 1000; + QTest::newRow("UnixTime_t:integer-overflow-positive") + << encode(0xc1, 0x1b, limit + 1) + << QCborValue(QCborKnownTags::UnixTime_t, qint64(limit) + 1); + QTest::newRow("UnixTime_t:integer-overflow-negative") + << encode(0xc1, 0x3b, limit) + << QCborValue(QCborKnownTags::UnixTime_t, -qint64(limit) - 1); + + double fplimit = std::numeric_limits<qint64>::min() / (-1000.); // 2^63 ms + QTest::newRow("UnixTime_t:fp-overflow-positive") + << encode(0xc1, 0xfb, fplimit) + << QCborValue(QCborKnownTags::UnixTime_t, fplimit); + QTest::newRow("UnixTime_t:fp-overflow-negative") + << encode(0xc1, 0xfb, -fplimit) + << QCborValue(QCborKnownTags::UnixTime_t, -fplimit); + } + + // But in fact, QCborValue stores date/times as their ISO textual + // representation, which means it can't represent dates before year 1 or + // after year 9999. + { + QDateTime dt(QDate(-1, 1, 1), QTime(0, 0), Qt::UTC); + QTest::newRow("UnixTime_t:negative-year") + << encode(0xc1, 0x3b, quint64(-dt.toSecsSinceEpoch()) - 1) + << QCborValue(QCborKnownTags::UnixTime_t, dt.toSecsSinceEpoch()); + + dt.setDate(QDate(10000, 1, 1)); + QTest::newRow("UnixTime_t:year10k") + << encode(0xc1, 0x1b, quint64(dt.toSecsSinceEpoch())) + << QCborValue(QCborKnownTags::UnixTime_t, dt.toSecsSinceEpoch()); + } + + // Invalid ISO date/time strings + { + auto add = [](const char *tag, const char *str) { + QByteArray raw; + if (strlen(str) < 0x18) + raw = encode(0xc0, 0x60 + int(strlen(str)), str); + else + raw = encode(0xc0, 0x78, quint8(strlen(str)), str); + QTest::addRow("DateTime:%s", tag) + << raw << QCborValue(QCborKnownTags::DateTimeString, QString(str)); + }; + // tst_QDateTime::fromStringDateFormat has more tests + add("junk", "jjj"); + add("zoned-date-only", "2020-04-15Z"); + add("month-13", "2020-13-01T00:00:00Z"); + add("negative-month", "2020--1-01T00:00:00Z"); + add("jan-32", "2020-01-32T00:00:00Z"); + add("apr-31", "2020-04-31T00:00:00Z"); + add("feb-30", "2020-02-30T00:00:00Z"); + add("feb-29-nonleap", "2021-02-29T00:00:00Z"); + add("negative-day", "2020-01--1T00:00:00Z"); + add("bad-separator", "2020-04-15j13:30:59Z"); + add("hour-25", "2020-04-15T25:00:00Z"); + add("negative-hour", "2020-04-15T-1:00:00Z"); + add("minute-60", "2020-04-15T23:60:00Z"); + add("negative-minute", "2020-04-15T23:-1:00Z"); + add("second-60", "2020-04-15T23:59:60Z"); // not a leap second + add("negative-second", "2020-04-15T23:59:-1Z"); + add("negative-milli", "2020-04-15T23.59:59.-1Z"); + + // walking null + char dt[] = "2020-04-15T17:33:32.125Z"; + quint8 len = strlen(dt); + for (int i = 0; i < int(len); ++i) { + char c = '\0'; + qSwap(c, dt[i]); + QTest::addRow("DateTime:Null-at-%d", i) + << encode(0xc0, 0x78, len) + QByteArray(dt, len) + << QCborValue(QCborKnownTags::DateTimeString, QLatin1String(dt, len)); + qSwap(c, dt[i]); + } + } + + // Improperly-encoded URLs + { + const char badurl[] = "%zz"; + QTest::newRow("Url:Invalid") + << encode(0xd8, int(QCborKnownTags::Url), 0x60 + int(strlen(badurl)), badurl) + << QCborValue(QCborKnownTags::Url, QLatin1String(badurl)); + } +} + +void tst_QCborValue::extendedTypeValidation() +{ + QFETCH(QByteArray, data); + QFETCH(QCborValue, expected); + + QCborParserError error; + QCborValue decoded = QCborValue::fromCbor(data, &error); + QVERIFY2(error.error == QCborError(), qPrintable(error.errorString())); + QCOMPARE(error.offset, data.size()); + QCOMPARE(decoded, expected); + + QByteArray encoded = decoded.toCbor(); +#if QT_VERSION < QT_VERSION_CHECK(6,0,0) + // behavior change, see qdatetime.cpp:fromIsoTimeString + QEXPECT_FAIL("DateTime:Null-at-19", "QDateTime parsing fixed, but only in 6.0", Abort); +#endif + QCOMPARE(encoded, data); +} + void tst_QCborValue::hugeDeviceValidation_data() { addValidationHugeDevice(MaxByteArraySize + 1, MaxStringSize + 1); diff --git a/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp b/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp index 513c811788..88dfdeccab 100644 --- a/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp +++ b/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp @@ -97,6 +97,13 @@ int main(int argc, char *argv[]) parser.process(app); const QString size = parser.value("size"); printf("Resizing %s to %s and saving to %s\n", qPrintable(parser.value("load")), qPrintable(size), qPrintable(parser.value("o"))); + } else if (command == "long") { + // A very long option (QTBUG-79926) + QCommandLineOption longOption(QStringList{QStringLiteral("looooooooooooong-option"), QStringLiteral("looooong-opt-alias")}); + longOption.setDescription(QStringLiteral("Short description")); + longOption.setValueName(QStringLiteral("looooooooooooong-value-name")); + parser.addOption(longOption); + parser.process(app); } else { // Call process again, to handle unknown options this time. parser.process(app); diff --git a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp index 1e87c76d2f..493d8d4982 100644 --- a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp +++ b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp @@ -78,6 +78,7 @@ private slots: void testUnknownOption(); void testHelpAll_data(); void testHelpAll(); + void testVeryLongOptionNames(); }; static char *empty_argv[] = { 0 }; @@ -737,6 +738,38 @@ void tst_QCommandLineParser::testHelpAll() #endif // QT_CONFIG(process) } +void tst_QCommandLineParser::testVeryLongOptionNames() +{ +#if !QT_CONFIG(process) + QSKIP("This test requires QProcess support"); +#else +#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) + QSKIP("Deploying executable applications to file system on Android not supported."); +#endif + + QCoreApplication app(empty_argc, empty_argv); + QProcess process; + process.start("testhelper/qcommandlineparser_test_helper", QStringList() << "0" << "long" << "--help"); + QVERIFY(process.waitForFinished(5000)); + QCOMPARE(process.exitStatus(), QProcess::NormalExit); + QString output = process.readAll(); +#ifdef Q_OS_WIN + output.replace(QStringLiteral("\r\n"), QStringLiteral("\n")); +#endif + const QStringList lines = output.split('\n'); + const int last = lines.count() - 1; + // Let's not compare everything, just the final parts. + QCOMPARE(lines.at(last - 7), " cdefghijklmnopqrstuvwxyz"); + QCOMPARE(lines.at(last - 6), " --looooooooooooong-option, --looooong-opt-alias <l Short description"); + QCOMPARE(lines.at(last - 5), " ooooooooooooong-value-name>"); + QCOMPARE(lines.at(last - 4), ""); + QCOMPARE(lines.at(last - 3), "Arguments:"); + QCOMPARE(lines.at(last - 2), " parsingMode The parsing mode to test."); + QCOMPARE(lines.at(last - 1), " command The command to execute."); + +#endif // QT_CONFIG(process) +} + QTEST_APPLESS_MAIN(tst_QCommandLineParser) #include "tst_qcommandlineparser.moc" diff --git a/tests/auto/testlib/selftests/expected_float.junitxml b/tests/auto/testlib/selftests/expected_float.junitxml index 602f9252a4..51a711efb7 100644 --- a/tests/auto/testlib/selftests/expected_float.junitxml +++ b/tests/auto/testlib/selftests/expected_float.junitxml @@ -17,8 +17,8 @@ Actual (operandLeft) : 999999999999 Expected (operandRight): 999999999998" result="fail"/> <failure tag="should FAIL 4" message="Compared doubles are not the same (fuzzy compare) - Actual (operandLeft) : 9.99999999999e-311 - Expected (operandRight): 9.99999999997e-311" result="fail"/> + Actual (operandLeft) : 1e-12 + Expected (operandRight): 9.99999999999e-13" result="fail"/> <failure tag="should FAIL 5" message="Compared doubles are not the same (fuzzy compare) Actual (operandLeft) : 9.99999999999e+306 Expected (operandRight): 9.99999999997e+306" result="fail"/> @@ -106,14 +106,14 @@ Actual (operandLeft) : 1 Expected (operandRight): 3" result="fail"/> <failure tag="should FAIL 2" message="Compared floats are not the same (fuzzy compare) - Actual (operandLeft) : 1e-07 - Expected (operandRight): 3e-07" result="fail"/> + Actual (operandLeft) : 1e-05 + Expected (operandRight): 3e-05" result="fail"/> <failure tag="should FAIL 3" message="Compared floats are not the same (fuzzy compare) Actual (operandLeft) : 99999 Expected (operandRight): 99998" result="fail"/> <failure tag="should FAIL 4" message="Compared floats are not the same (fuzzy compare) - Actual (operandLeft) : 9.9999e-40 - Expected (operandRight): 9.99971e-40" result="fail"/> + Actual (operandLeft) : 1.00001e-05 + Expected (operandRight): 9.9999e-06" result="fail"/> <failure tag="should FAIL 5" message="Compared floats are not the same (fuzzy compare) Actual (operandLeft) : 9.9999e+37 Expected (operandRight): 9.9997e+37" result="fail"/> @@ -201,14 +201,14 @@ 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"/> + Actual (operandLeft) : 0.000999 + Expected (operandRight): 0.003" result="fail"/> <failure tag="should FAIL 3" message="Compared qfloat16s are not the same (fuzzy compare) Actual (operandLeft) : 98 Expected (operandRight): 99" result="fail"/> <failure tag="should FAIL 4" message="Compared qfloat16s are not the same (fuzzy compare) - Actual (operandLeft) : 5.93e-05 - Expected (operandRight): 5.87e-05" result="fail"/> + Actual (operandLeft) : 0.00101 + Expected (operandRight): 0.00099" result="fail"/> <failure tag="should FAIL 5" message="Compared qfloat16s are not the same (fuzzy compare) Actual (operandLeft) : 5.94e+04 Expected (operandRight): 5.88e+04" result="fail"/> @@ -295,9 +295,9 @@ <failure tag="1e0" message="Compared floats are not the same (fuzzy compare) Actual (t1): 1 Expected (t3): 3" result="fail"/> - <failure tag="1e-7" message="Compared floats are not the same (fuzzy compare) - Actual (t1): 1e-07 - Expected (t3): 3e-07" result="fail"/> + <failure tag="1e-5" message="Compared floats are not the same (fuzzy compare) + Actual (t1): 1e-05 + Expected (t3): 3e-05" result="fail"/> <failure tag="1e+7" message="Compared floats are not the same (fuzzy compare) Actual (t1): 1e+07 Expected (t3): 3e+07" result="fail"/> diff --git a/tests/auto/testlib/selftests/expected_float.lightxml b/tests/auto/testlib/selftests/expected_float.lightxml index 5f5114bb2e..cf82929fd0 100644 --- a/tests/auto/testlib/selftests/expected_float.lightxml +++ b/tests/auto/testlib/selftests/expected_float.lightxml @@ -38,8 +38,8 @@ <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> <DataTag><![CDATA[should FAIL 4]]></DataTag> <Description><![CDATA[Compared doubles are not the same (fuzzy compare) - Actual (operandLeft) : 9.99999999999e-311 - Expected (operandRight): 9.99999999997e-311]]></Description> + Actual (operandLeft) : 1e-12 + Expected (operandRight): 9.99999999999e-13]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[should PASS 4]]></DataTag> @@ -230,8 +230,8 @@ <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> <DataTag><![CDATA[should FAIL 2]]></DataTag> <Description><![CDATA[Compared floats are not the same (fuzzy compare) - Actual (operandLeft) : 1e-07 - Expected (operandRight): 3e-07]]></Description> + Actual (operandLeft) : 1e-05 + Expected (operandRight): 3e-05]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[should PASS 2]]></DataTag> @@ -248,8 +248,8 @@ <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> <DataTag><![CDATA[should FAIL 4]]></DataTag> <Description><![CDATA[Compared floats are not the same (fuzzy compare) - Actual (operandLeft) : 9.9999e-40 - Expected (operandRight): 9.99971e-40]]></Description> + Actual (operandLeft) : 1.00001e-05 + Expected (operandRight): 9.9999e-06]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[should PASS 4]]></DataTag> @@ -440,8 +440,8 @@ <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> + Actual (operandLeft) : 0.000999 + Expected (operandRight): 0.003]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[should PASS 2]]></DataTag> @@ -458,8 +458,8 @@ <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> <DataTag><![CDATA[should FAIL 4]]></DataTag> <Description><![CDATA[Compared qfloat16s are not the same (fuzzy compare) - Actual (operandLeft) : 5.93e-05 - Expected (operandRight): 5.87e-05]]></Description> + Actual (operandLeft) : 0.00101 + Expected (operandRight): 0.00099]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[should PASS 4]]></DataTag> @@ -645,10 +645,10 @@ Expected (t3): 3]]></Description> </Incident> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> - <DataTag><![CDATA[1e-7]]></DataTag> + <DataTag><![CDATA[1e-5]]></DataTag> <Description><![CDATA[Compared floats are not the same (fuzzy compare) - Actual (t1): 1e-07 - Expected (t3): 3e-07]]></Description> + Actual (t1): 1e-05 + Expected (t3): 3e-05]]></Description> </Incident> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> <DataTag><![CDATA[1e+7]]></DataTag> diff --git a/tests/auto/testlib/selftests/expected_float.tap b/tests/auto/testlib/selftests/expected_float.tap index 9da51b93b3..f5249b8b4e 100644 --- a/tests/auto/testlib/selftests/expected_float.tap +++ b/tests/auto/testlib/selftests/expected_float.tap @@ -44,10 +44,10 @@ not ok 8 - doubleComparisons(should FAIL 4) --- type: QCOMPARE message: Compared doubles are not the same (fuzzy compare) - wanted: 9.99999999997e-311 (operandRight) - found: 9.99999999999e-311 (operandLeft) - expected: 9.99999999997e-311 (operandRight) - actual: 9.99999999999e-311 (operandLeft) + wanted: 9.99999999999e-13 (operandRight) + found: 1e-12 (operandLeft) + expected: 9.99999999999e-13 (operandRight) + actual: 1e-12 (operandLeft) at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:103) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp line: 103 @@ -388,22 +388,22 @@ 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... ok 41 - floatComparisons(should PASS 1) not ok 42 - floatComparisons(should FAIL 2) --- type: QCOMPARE message: Compared floats are not the same (fuzzy compare) - wanted: 3e-07 (operandRight) - found: 1e-07 (operandLeft) - expected: 3e-07 (operandRight) - actual: 1e-07 (operandLeft) - at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:137) + wanted: 3e-05 (operandRight) + found: 1e-05 (operandLeft) + expected: 3e-05 (operandRight) + actual: 1e-05 (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... ok 43 - floatComparisons(should PASS 2) not ok 44 - floatComparisons(should FAIL 3) @@ -414,22 +414,22 @@ 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... ok 45 - floatComparisons(should PASS 3) not ok 46 - floatComparisons(should FAIL 4) --- type: QCOMPARE message: Compared floats are not the same (fuzzy compare) - wanted: 9.99971e-40 (operandRight) - 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:137) + wanted: 9.9999e-06 (operandRight) + found: 1.00001e-05 (operandLeft) + expected: 9.9999e-06 (operandRight) + actual: 1.00001e-05 (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... not ok 77 - floatComparisons(should FAIL: -max != -inf) --- @@ -755,9 +755,9 @@ 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:137) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:139) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 137 + line: 139 ... not ok 78 - float16Comparisons(should FAIL 1) --- @@ -767,22 +767,22 @@ not ok 78 - float16Comparisons(should FAIL 1) found: 1 (operandLeft) expected: 3 (operandRight) actual: 1 (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... ok 79 - float16Comparisons(should PASS 1) 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:171) + wanted: 0.003 (operandRight) + found: 0.000999 (operandLeft) + expected: 0.003 (operandRight) + actual: 0.000999 (operandLeft) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... ok 81 - float16Comparisons(should PASS 2) not ok 82 - float16Comparisons(should FAIL 3) @@ -793,22 +793,22 @@ not ok 82 - float16Comparisons(should FAIL 3) found: 98 (operandLeft) expected: 99 (operandRight) actual: 98 (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... ok 83 - float16Comparisons(should PASS 3) not ok 84 - float16Comparisons(should FAIL 4) --- type: QCOMPARE message: Compared qfloat16s are not the same (fuzzy compare) - wanted: 5.87e-05 (operandRight) - found: 5.93e-05 (operandLeft) - expected: 5.87e-05 (operandRight) - actual: 5.93e-05 (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + wanted: 0.00099 (operandRight) + found: 0.00101 (operandLeft) + expected: 0.00099 (operandRight) + actual: 0.00101 (operandLeft) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... ok 85 - float16Comparisons(should PASS 4) not ok 86 - float16Comparisons(should FAIL 5) @@ -819,9 +819,9 @@ not ok 86 - float16Comparisons(should FAIL 5) found: 5.94e+04 (operandLeft) expected: 5.88e+04 (operandRight) actual: 5.94e+04 (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... ok 87 - float16Comparisons(should PASS: NaN == NaN) not ok 88 - float16Comparisons(should FAIL: NaN != 0) @@ -832,9 +832,9 @@ not ok 88 - float16Comparisons(should FAIL: NaN != 0) found: nan (operandLeft) expected: 0 (operandRight) actual: nan (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 89 - float16Comparisons(should FAIL: 0 != NaN) --- @@ -844,9 +844,9 @@ not ok 89 - float16Comparisons(should FAIL: 0 != NaN) found: 0 (operandLeft) expected: nan (operandRight) actual: 0 (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 90 - float16Comparisons(should FAIL: NaN != 1) --- @@ -856,9 +856,9 @@ not ok 90 - float16Comparisons(should FAIL: NaN != 1) found: nan (operandLeft) expected: 1 (operandRight) actual: nan (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 91 - float16Comparisons(should FAIL: 1 != NaN) --- @@ -868,9 +868,9 @@ not ok 91 - float16Comparisons(should FAIL: 1 != NaN) found: 1 (operandLeft) expected: nan (operandRight) actual: 1 (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... ok 92 - float16Comparisons(should PASS: inf == inf) ok 93 - float16Comparisons(should PASS: -inf == -inf) @@ -882,9 +882,9 @@ not ok 94 - float16Comparisons(should FAIL: inf != -inf) found: inf (operandLeft) expected: -inf (operandRight) actual: inf (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 95 - float16Comparisons(should FAIL: -inf != inf) --- @@ -894,9 +894,9 @@ not ok 95 - float16Comparisons(should FAIL: -inf != inf) found: -inf (operandLeft) expected: inf (operandRight) actual: -inf (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 96 - float16Comparisons(should FAIL: inf != nan) --- @@ -906,9 +906,9 @@ not ok 96 - float16Comparisons(should FAIL: inf != nan) found: inf (operandLeft) expected: nan (operandRight) actual: inf (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 97 - float16Comparisons(should FAIL: nan != inf) --- @@ -918,9 +918,9 @@ not ok 97 - float16Comparisons(should FAIL: nan != inf) found: nan (operandLeft) expected: inf (operandRight) actual: nan (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 98 - float16Comparisons(should FAIL: -inf != nan) --- @@ -930,9 +930,9 @@ not ok 98 - float16Comparisons(should FAIL: -inf != nan) found: -inf (operandLeft) expected: nan (operandRight) actual: -inf (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 99 - float16Comparisons(should FAIL: nan != -inf) --- @@ -942,9 +942,9 @@ not ok 99 - float16Comparisons(should FAIL: nan != -inf) found: nan (operandLeft) expected: -inf (operandRight) actual: nan (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 100 - float16Comparisons(should FAIL: inf != 0) --- @@ -954,9 +954,9 @@ not ok 100 - float16Comparisons(should FAIL: inf != 0) found: inf (operandLeft) expected: 0 (operandRight) actual: inf (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 101 - float16Comparisons(should FAIL: 0 != inf) --- @@ -966,9 +966,9 @@ not ok 101 - float16Comparisons(should FAIL: 0 != inf) found: 0 (operandLeft) expected: inf (operandRight) actual: 0 (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 102 - float16Comparisons(should FAIL: -inf != 0) --- @@ -978,9 +978,9 @@ not ok 102 - float16Comparisons(should FAIL: -inf != 0) found: -inf (operandLeft) expected: 0 (operandRight) actual: -inf (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 103 - float16Comparisons(should FAIL: 0 != -inf) --- @@ -990,9 +990,9 @@ not ok 103 - float16Comparisons(should FAIL: 0 != -inf) found: 0 (operandLeft) expected: -inf (operandRight) actual: 0 (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 104 - float16Comparisons(should FAIL: inf != 1) --- @@ -1002,9 +1002,9 @@ not ok 104 - float16Comparisons(should FAIL: inf != 1) found: inf (operandLeft) expected: 1 (operandRight) actual: inf (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 105 - float16Comparisons(should FAIL: 1 != inf) --- @@ -1014,9 +1014,9 @@ not ok 105 - float16Comparisons(should FAIL: 1 != inf) found: 1 (operandLeft) expected: inf (operandRight) actual: 1 (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 106 - float16Comparisons(should FAIL: -inf != 1) --- @@ -1026,9 +1026,9 @@ not ok 106 - float16Comparisons(should FAIL: -inf != 1) found: -inf (operandLeft) expected: 1 (operandRight) actual: -inf (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 107 - float16Comparisons(should FAIL: 1 != -inf) --- @@ -1038,9 +1038,9 @@ not ok 107 - float16Comparisons(should FAIL: 1 != -inf) found: 1 (operandLeft) expected: -inf (operandRight) actual: 1 (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 108 - float16Comparisons(should FAIL: inf != max) --- @@ -1050,9 +1050,9 @@ not ok 108 - float16Comparisons(should FAIL: inf != max) found: inf (operandLeft) expected: 6.55e+04 (operandRight) actual: inf (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 109 - float16Comparisons(should FAIL: inf != -max) --- @@ -1062,9 +1062,9 @@ not ok 109 - float16Comparisons(should FAIL: inf != -max) found: inf (operandLeft) expected: -6.55e+04 (operandRight) actual: inf (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 110 - float16Comparisons(should FAIL: max != inf) --- @@ -1074,9 +1074,9 @@ not ok 110 - float16Comparisons(should FAIL: max != inf) found: 6.55e+04 (operandLeft) expected: inf (operandRight) actual: 6.55e+04 (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 111 - float16Comparisons(should FAIL: -max != inf) --- @@ -1086,9 +1086,9 @@ not ok 111 - float16Comparisons(should FAIL: -max != inf) found: -6.55e+04 (operandLeft) expected: inf (operandRight) actual: -6.55e+04 (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 112 - float16Comparisons(should FAIL: -inf != max) --- @@ -1098,9 +1098,9 @@ not ok 112 - float16Comparisons(should FAIL: -inf != max) found: -inf (operandLeft) expected: 6.55e+04 (operandRight) actual: -inf (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 113 - float16Comparisons(should FAIL: -inf != -max) --- @@ -1110,9 +1110,9 @@ not ok 113 - float16Comparisons(should FAIL: -inf != -max) found: -inf (operandLeft) expected: -6.55e+04 (operandRight) actual: -inf (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 114 - float16Comparisons(should FAIL: max != -inf) --- @@ -1122,9 +1122,9 @@ not ok 114 - float16Comparisons(should FAIL: max != -inf) found: 6.55e+04 (operandLeft) expected: -inf (operandRight) actual: 6.55e+04 (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 115 - float16Comparisons(should FAIL: -max != -inf) --- @@ -1134,9 +1134,9 @@ not ok 115 - float16Comparisons(should FAIL: -max != -inf) found: -6.55e+04 (operandLeft) expected: -inf (operandRight) actual: -6.55e+04 (operandLeft) - at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:171) + at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:174) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 171 + line: 174 ... not ok 116 - compareFloatTests(1e0) --- @@ -1146,21 +1146,21 @@ not ok 116 - compareFloatTests(1e0) found: 1 (t1) expected: 3 (t3) actual: 1 (t1) - at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:210) + at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:215) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 210 + line: 215 ... -not ok 117 - compareFloatTests(1e-7) +not ok 117 - compareFloatTests(1e-5) --- type: QCOMPARE message: Compared floats are not the same (fuzzy compare) - wanted: 3e-07 (t3) - found: 1e-07 (t1) - expected: 3e-07 (t3) - actual: 1e-07 (t1) - at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:210) + wanted: 3e-05 (t3) + found: 1e-05 (t1) + expected: 3e-05 (t3) + actual: 1e-05 (t1) + at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:215) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 210 + line: 215 ... not ok 118 - compareFloatTests(1e+7) --- @@ -1170,9 +1170,9 @@ not ok 118 - 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:210) + at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:215) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 210 + line: 215 ... ok 119 - cleanupTestCase() 1..119 diff --git a/tests/auto/testlib/selftests/expected_float.teamcity b/tests/auto/testlib/selftests/expected_float.teamcity index af81296c42..f8d65a71c7 100644 --- a/tests/auto/testlib/selftests/expected_float.teamcity +++ b/tests/auto/testlib/selftests/expected_float.teamcity @@ -17,7 +17,7 @@ ##teamcity[testStarted name='doubleComparisons(should PASS 3)' flowId='tst_float'] ##teamcity[testFinished name='doubleComparisons(should PASS 3)' flowId='tst_float'] ##teamcity[testStarted name='doubleComparisons(should FAIL 4)' flowId='tst_float'] -##teamcity[testFailed name='doubleComparisons(should FAIL 4)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)|]' details='Compared doubles are not the same (fuzzy compare)|n Actual (operandLeft) : 9.99999999999e-311|n Expected (operandRight): 9.99999999997e-311' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL 4)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)|]' details='Compared doubles are not the same (fuzzy compare)|n Actual (operandLeft) : 1e-12|n Expected (operandRight): 9.99999999999e-13' flowId='tst_float'] ##teamcity[testFinished name='doubleComparisons(should FAIL 4)' flowId='tst_float'] ##teamcity[testStarted name='doubleComparisons(should PASS 4)' flowId='tst_float'] ##teamcity[testFinished name='doubleComparisons(should PASS 4)' flowId='tst_float'] @@ -114,7 +114,7 @@ ##teamcity[testStarted name='floatComparisons(should PASS 1)' flowId='tst_float'] ##teamcity[testFinished name='floatComparisons(should PASS 1)' flowId='tst_float'] ##teamcity[testStarted name='floatComparisons(should FAIL 2)' flowId='tst_float'] -##teamcity[testFailed name='floatComparisons(should FAIL 2)' 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) : 1e-07|n Expected (operandRight): 3e-07' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL 2)' 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) : 1e-05|n Expected (operandRight): 3e-05' flowId='tst_float'] ##teamcity[testFinished name='floatComparisons(should FAIL 2)' flowId='tst_float'] ##teamcity[testStarted name='floatComparisons(should PASS 2)' flowId='tst_float'] ##teamcity[testFinished name='floatComparisons(should PASS 2)' flowId='tst_float'] @@ -124,7 +124,7 @@ ##teamcity[testStarted name='floatComparisons(should PASS 3)' flowId='tst_float'] ##teamcity[testFinished name='floatComparisons(should PASS 3)' flowId='tst_float'] ##teamcity[testStarted name='floatComparisons(should FAIL 4)' flowId='tst_float'] -##teamcity[testFailed name='floatComparisons(should FAIL 4)' 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) : 9.9999e-40|n Expected (operandRight): 9.99971e-40' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL 4)' 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) : 1.00001e-05|n Expected (operandRight): 9.9999e-06' flowId='tst_float'] ##teamcity[testFinished name='floatComparisons(should FAIL 4)' flowId='tst_float'] ##teamcity[testStarted name='floatComparisons(should PASS 4)' flowId='tst_float'] ##teamcity[testFinished name='floatComparisons(should PASS 4)' flowId='tst_float'] @@ -221,7 +221,7 @@ ##teamcity[testStarted name='float16Comparisons(should PASS 1)' flowId='tst_float'] ##teamcity[testFinished name='float16Comparisons(should PASS 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[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.000999|n Expected (operandRight): 0.003' flowId='tst_float'] ##teamcity[testFinished name='float16Comparisons(should FAIL 2)' flowId='tst_float'] ##teamcity[testStarted name='float16Comparisons(should PASS 2)' flowId='tst_float'] ##teamcity[testFinished name='float16Comparisons(should PASS 2)' flowId='tst_float'] @@ -231,7 +231,7 @@ ##teamcity[testStarted name='float16Comparisons(should PASS 3)' flowId='tst_float'] ##teamcity[testFinished name='float16Comparisons(should PASS 3)' flowId='tst_float'] ##teamcity[testStarted name='float16Comparisons(should FAIL 4)' flowId='tst_float'] -##teamcity[testFailed name='float16Comparisons(should FAIL 4)' 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) : 5.93e-05|n Expected (operandRight): 5.87e-05' flowId='tst_float'] +##teamcity[testFailed name='float16Comparisons(should FAIL 4)' 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.00101|n Expected (operandRight): 0.00099' flowId='tst_float'] ##teamcity[testFinished name='float16Comparisons(should FAIL 4)' flowId='tst_float'] ##teamcity[testStarted name='float16Comparisons(should PASS 4)' flowId='tst_float'] ##teamcity[testFinished name='float16Comparisons(should PASS 4)' flowId='tst_float'] @@ -325,9 +325,9 @@ ##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'] -##teamcity[testStarted name='compareFloatTests(1e-7)' flowId='tst_float'] -##teamcity[testFailed name='compareFloatTests(1e-7)' 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): 1e-07|n Expected (t3): 3e-07' flowId='tst_float'] -##teamcity[testFinished name='compareFloatTests(1e-7)' flowId='tst_float'] +##teamcity[testStarted name='compareFloatTests(1e-5)' flowId='tst_float'] +##teamcity[testFailed name='compareFloatTests(1e-5)' 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): 1e-05|n Expected (t3): 3e-05' flowId='tst_float'] +##teamcity[testFinished name='compareFloatTests(1e-5)' flowId='tst_float'] ##teamcity[testStarted name='compareFloatTests(1e+7)' flowId='tst_float'] ##teamcity[testFailed name='compareFloatTests(1e+7)' 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): 1e+07|n Expected (t3): 3e+07' flowId='tst_float'] ##teamcity[testFinished name='compareFloatTests(1e+7)' flowId='tst_float'] diff --git a/tests/auto/testlib/selftests/expected_float.txt b/tests/auto/testlib/selftests/expected_float.txt index d22a52a63d..25c8c6b6de 100644 --- a/tests/auto/testlib/selftests/expected_float.txt +++ b/tests/auto/testlib/selftests/expected_float.txt @@ -17,8 +17,8 @@ FAIL! : tst_float::doubleComparisons(should FAIL 3) Compared doubles are not th Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] PASS : tst_float::doubleComparisons(should PASS 3) FAIL! : tst_float::doubleComparisons(should FAIL 4) Compared doubles are not the same (fuzzy compare) - Actual (operandLeft) : 9.99999999999e-311 - Expected (operandRight): 9.99999999997e-311 + Actual (operandLeft) : 1e-12 + Expected (operandRight): 9.99999999999e-13 Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] PASS : tst_float::doubleComparisons(should PASS 4) FAIL! : tst_float::doubleComparisons(should FAIL 5) Compared doubles are not the same (fuzzy compare) @@ -138,8 +138,8 @@ FAIL! : tst_float::floatComparisons(should FAIL 1) Compared floats are not the Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] PASS : tst_float::floatComparisons(should PASS 1) FAIL! : tst_float::floatComparisons(should FAIL 2) Compared floats are not the same (fuzzy compare) - Actual (operandLeft) : 1e-07 - Expected (operandRight): 3e-07 + Actual (operandLeft) : 1e-05 + Expected (operandRight): 3e-05 Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] PASS : tst_float::floatComparisons(should PASS 2) FAIL! : tst_float::floatComparisons(should FAIL 3) Compared floats are not the same (fuzzy compare) @@ -148,8 +148,8 @@ FAIL! : tst_float::floatComparisons(should FAIL 3) Compared floats are not the Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] PASS : tst_float::floatComparisons(should PASS 3) FAIL! : tst_float::floatComparisons(should FAIL 4) Compared floats are not the same (fuzzy compare) - Actual (operandLeft) : 9.9999e-40 - Expected (operandRight): 9.99971e-40 + Actual (operandLeft) : 1.00001e-05 + Expected (operandRight): 9.9999e-06 Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] PASS : tst_float::floatComparisons(should PASS 4) FAIL! : tst_float::floatComparisons(should FAIL 5) Compared floats are not the same (fuzzy compare) @@ -269,8 +269,8 @@ FAIL! : tst_float::float16Comparisons(should FAIL 1) Compared qfloat16s are not Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] PASS : tst_float::float16Comparisons(should PASS 1) FAIL! : tst_float::float16Comparisons(should FAIL 2) Compared qfloat16s are not the same (fuzzy compare) - Actual (operandLeft) : 0.0001 - Expected (operandRight): 0.0003 + Actual (operandLeft) : 0.000999 + Expected (operandRight): 0.003 Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] PASS : tst_float::float16Comparisons(should PASS 2) FAIL! : tst_float::float16Comparisons(should FAIL 3) Compared qfloat16s are not the same (fuzzy compare) @@ -279,8 +279,8 @@ FAIL! : tst_float::float16Comparisons(should FAIL 3) Compared qfloat16s are not Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] PASS : tst_float::float16Comparisons(should PASS 3) FAIL! : tst_float::float16Comparisons(should FAIL 4) Compared qfloat16s are not the same (fuzzy compare) - Actual (operandLeft) : 5.93e-05 - Expected (operandRight): 5.87e-05 + Actual (operandLeft) : 0.00101 + Expected (operandRight): 0.00099 Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] PASS : tst_float::float16Comparisons(should PASS 4) FAIL! : tst_float::float16Comparisons(should FAIL 5) Compared qfloat16s are not the same (fuzzy compare) @@ -398,9 +398,9 @@ FAIL! : tst_float::compareFloatTests(1e0) Compared floats are not the same (fuz Actual (t1): 1 Expected (t3): 3 Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] -FAIL! : tst_float::compareFloatTests(1e-7) Compared floats are not the same (fuzzy compare) - Actual (t1): 1e-07 - Expected (t3): 3e-07 +FAIL! : tst_float::compareFloatTests(1e-5) Compared floats are not the same (fuzzy compare) + Actual (t1): 1e-05 + Expected (t3): 3e-05 Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] FAIL! : tst_float::compareFloatTests(1e+7) Compared floats are not the same (fuzzy compare) Actual (t1): 1e+07 diff --git a/tests/auto/testlib/selftests/expected_float.xml b/tests/auto/testlib/selftests/expected_float.xml index 247bce9577..8ddc72a917 100644 --- a/tests/auto/testlib/selftests/expected_float.xml +++ b/tests/auto/testlib/selftests/expected_float.xml @@ -40,8 +40,8 @@ <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> <DataTag><![CDATA[should FAIL 4]]></DataTag> <Description><![CDATA[Compared doubles are not the same (fuzzy compare) - Actual (operandLeft) : 9.99999999999e-311 - Expected (operandRight): 9.99999999997e-311]]></Description> + Actual (operandLeft) : 1e-12 + Expected (operandRight): 9.99999999999e-13]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[should PASS 4]]></DataTag> @@ -232,8 +232,8 @@ <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> <DataTag><![CDATA[should FAIL 2]]></DataTag> <Description><![CDATA[Compared floats are not the same (fuzzy compare) - Actual (operandLeft) : 1e-07 - Expected (operandRight): 3e-07]]></Description> + Actual (operandLeft) : 1e-05 + Expected (operandRight): 3e-05]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[should PASS 2]]></DataTag> @@ -250,8 +250,8 @@ <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> <DataTag><![CDATA[should FAIL 4]]></DataTag> <Description><![CDATA[Compared floats are not the same (fuzzy compare) - Actual (operandLeft) : 9.9999e-40 - Expected (operandRight): 9.99971e-40]]></Description> + Actual (operandLeft) : 1.00001e-05 + Expected (operandRight): 9.9999e-06]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[should PASS 4]]></DataTag> @@ -442,8 +442,8 @@ <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> + Actual (operandLeft) : 0.000999 + Expected (operandRight): 0.003]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[should PASS 2]]></DataTag> @@ -460,8 +460,8 @@ <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> <DataTag><![CDATA[should FAIL 4]]></DataTag> <Description><![CDATA[Compared qfloat16s are not the same (fuzzy compare) - Actual (operandLeft) : 5.93e-05 - Expected (operandRight): 5.87e-05]]></Description> + Actual (operandLeft) : 0.00101 + Expected (operandRight): 0.00099]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[should PASS 4]]></DataTag> @@ -647,10 +647,10 @@ Expected (t3): 3]]></Description> </Incident> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> - <DataTag><![CDATA[1e-7]]></DataTag> + <DataTag><![CDATA[1e-5]]></DataTag> <Description><![CDATA[Compared floats are not the same (fuzzy compare) - Actual (t1): 1e-07 - Expected (t3): 3e-07]]></Description> + Actual (t1): 1e-05 + Expected (t3): 3e-05]]></Description> </Incident> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> <DataTag><![CDATA[1e+7]]></DataTag> diff --git a/tests/auto/testlib/selftests/float/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/float/.prev_CMakeLists.txt index c037179b74..dfcf2349ad 100644 --- a/tests/auto/testlib/selftests/float/.prev_CMakeLists.txt +++ b/tests/auto/testlib/selftests/float/.prev_CMakeLists.txt @@ -6,7 +6,10 @@ add_qt_executable(float SOURCES + ../../../../shared/emulationdetector.h tst_float.cpp + INCLUDE_DIRECTORIES + ../../../../shared PUBLIC_LIBRARIES Qt::Test ) diff --git a/tests/auto/testlib/selftests/float/CMakeLists.txt b/tests/auto/testlib/selftests/float/CMakeLists.txt index fa8c1c89bc..0fd7e4f455 100644 --- a/tests/auto/testlib/selftests/float/CMakeLists.txt +++ b/tests/auto/testlib/selftests/float/CMakeLists.txt @@ -8,7 +8,10 @@ add_qt_executable(float NO_INSTALL # special case OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case SOURCES + ../../../../shared/emulationdetector.h tst_float.cpp + INCLUDE_DIRECTORIES + ../../../../shared PUBLIC_LIBRARIES Qt::Test ) diff --git a/tests/auto/testlib/selftests/float/float.pro b/tests/auto/testlib/selftests/float/float.pro index 479eb152c5..8f169921c3 100644 --- a/tests/auto/testlib/selftests/float/float.pro +++ b/tests/auto/testlib/selftests/float/float.pro @@ -1,9 +1,10 @@ -SOURCES += tst_float.cpp QT = core testlib - mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target +INCLUDEPATH += ../../../../shared/ +HEADERS = ../../../../shared/emulationdetector.h +SOURCES += tst_float.cpp 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 cefd8a57c4..823495f863 100644 --- a/tests/auto/testlib/selftests/float/tst_float.cpp +++ b/tests/auto/testlib/selftests/float/tst_float.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -31,6 +31,8 @@ #include <QtTest/QtTest> #include <QDebug> +#include "emulationdetector.h" + // Test proper handling of floating-point types class tst_float: public QObject { @@ -113,16 +115,18 @@ void tst_float::doubleComparisons_data() const QTest::newRow("should PASS 1") << zero << zero; QTest::newRow("should FAIL 2") << 1.e-7 << 3.e-7; - // QCOMPARE for doubles uses qFuzzyCompare(), which succeeds if the numbers - // differ by no more than 1e-12 times the smaller value. Thus - // QCOMPARE(1e12-2, 1e12-1) should fail, while QCOMPARE(1e12+1, 1e12+2) - // should pass. + // QCOMPARE() uses qFuzzyCompare(), which succeeds if doubles differ by no + // more than 1e-12 times the smaller value; but QCOMPARE() also considers + // values equal if qFuzzyIsNull() is true for both, so all doubles smaller + // than 1e-12 are equal. Thus QCOMPARE(1e12-2, 1e12-1) should fail, while + // QCOMPARE(1e12+1, 1e12+2) should pass, as should QCOMPARE(1e-12-2e-24, + // 1e-12-1e-24), despite the values differing by more than one part in 1e12. QTest::newRow("should PASS 2") << 1e12 + one << 1e12 + 2.; QTest::newRow("should FAIL 3") << 1e12 - one << 1e12 - 2.; + QTest::newRow("should PASS 3") << 1e-12 << -1e-12; // ... but rounding makes that a bit unrelaible when scaled close to the bounds. - QTest::newRow("should PASS 3") << 1e-310 + 1e-322 << 1e-310 + 2e-322; - QTest::newRow("should FAIL 4") << 1e-310 - 1e-322 << 1e-310 - 3e-322; + QTest::newRow("should FAIL 4") << 1e-12 + 1e-24 << 1e-12 - 1e-24; QTest::newRow("should PASS 4") << 1e307 + 1e295 << 1e307 + 2e295; QTest::newRow("should FAIL 5") << 1e307 - 1e295 << 1e307 - 3e295; @@ -145,18 +149,20 @@ void tst_float::floatComparisons_data() const QTest::newRow("should FAIL 1") << one << 3.f; QTest::newRow("should PASS 1") << zero << zero; - QTest::newRow("should FAIL 2") << 1.e-7f << 3.e-7f; + QTest::newRow("should FAIL 2") << 1.e-5f << 3.e-5f; - // QCOMPARE for floats uses qFuzzyCompare(), which succeeds if the numbers - // differ by no more than 1e-5 times the smaller value. Thus - // QCOMPARE(1e5-2, 1e5-1) should fail, while QCOMPARE(1e5+1, 1e5+2) - // should pass. + // QCOMPARE() uses qFuzzyCompare(), which succeeds if the floats differ by + // no more than 1e-5 times the smaller value; but QCOMPARE() also considers + // values equal if qFuzzyIsNull is true for both, so all floats smaller than + // 1e-5 are equal. Thus QCOMPARE(1e5-2, 1e5-1) should fail, while + // QCOMPARE(1e5+1, 1e5+2) should pass, as should QCOMPARE(1e-5-2e-10, + // 1e-5-1e-10), despite the values differing by more than one part in 1e5. QTest::newRow("should PASS 2") << 1e5f + one << 1e5f + 2.f; QTest::newRow("should FAIL 3") << 1e5f - one << 1e5f - 2.f; + QTest::newRow("should PASS 3") << 1e-5f << -1e-5f; // ... but rounding makes that a bit unrelaible when scaled close to the bounds. - QTest::newRow("should PASS 3") << 1e-39f + 1e-44f << 1e-39f + 2e-44f; - QTest::newRow("should FAIL 4") << 1e-39f - 1e-44f << 1e-39f - 3e-44f; + QTest::newRow("should FAIL 4") << 1e-5f + 1e-10f << 1e-5f - 1e-10f; QTest::newRow("should PASS 4") << 1e38f + 1e33f << 1e38f + 2e33f; QTest::newRow("should FAIL 5") << 1e38f - 1e33f << 1e38f - 3e33f; @@ -175,18 +181,21 @@ void tst_float::float16Comparisons_data() const { QTest::addColumn<qfloat16>("operandLeft"); QTest::addColumn<qfloat16>("operandRight"); - qfloat16 zero(0), one(1); + const qfloat16 zero(0), one(1); + const qfloat16 tiny(EmulationDetector::isRunningArmOnX86() ? 0.00099f : 0.001f); QTest::newRow("should FAIL 1") << one << qfloat16(3); QTest::newRow("should PASS 1") << zero << zero; - QTest::newRow("should FAIL 2") << qfloat16(1e-4f) << qfloat16(3e-4f); + QTest::newRow("should FAIL 2") << qfloat16(1e-3f) << qfloat16(3e-3f); - // QCOMPARE for qfloat16s uses qFuzzyCompare() + // QCOMPARE for uses qFuzzyCompare(), which ignores differences of one part + // in 102.5 and considers any two qFuzzyIsNull() values, i.e. values smaller + // than 1e-3, equal QTest::newRow("should PASS 2") << qfloat16(1001) << qfloat16(1002); QTest::newRow("should FAIL 3") << qfloat16(98) << qfloat16(99); + QTest::newRow("should PASS 3") << tiny << -tiny; // ... which gets a bit unreliable near to the type's bounds - QTest::newRow("should PASS 3") << qfloat16(6e-5f) + qfloat16(6e-7f) << qfloat16(6e-5f) + qfloat16(11e-7f); - QTest::newRow("should FAIL 4") << qfloat16(6e-5f) - qfloat16(7e-7f) << qfloat16(6e-5f) - qfloat16(13e-7f); + QTest::newRow("should FAIL 4") << qfloat16(1.01e-3f) << qfloat16(0.99e-3f); QTest::newRow("should PASS 4") << qfloat16(6e4) + qfloat16(700) << qfloat16(6e4) + qfloat16(1200); QTest::newRow("should FAIL 5") << qfloat16(6e4) - qfloat16(600) << qfloat16(6e4) - qfloat16(1200); @@ -200,7 +209,7 @@ void tst_float::compareFloatTests() const // Create two more values // t2 differs from t1 by 1 ppm (part per million) // t3 differs from t1 by 200% - // we should consider that t1 == t2 and t1 != t3 + // We should consider that t1 == t2 and t1 != t3 (provided at least one is > 1e-5) const float t2 = t1 + (t1 / 1e6); const float t3 = 3 * t1; @@ -214,7 +223,7 @@ void tst_float::compareFloatTests_data() const { QTest::addColumn<float>("t1"); QTest::newRow("1e0") << 1e0f; - QTest::newRow("1e-7") << 1e-7f; + QTest::newRow("1e-5") << 1e-5f; QTest::newRow("1e+7") << 1e+7f; } diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index cab6589984..84090c22ca 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2016 Intel Corporation. ** Contact: https://www.qt.io/licensing/ ** @@ -940,6 +940,14 @@ bool tst_Selftests::compareLine(const QString &logger, const QString &subdir, return true; } + if (EmulationDetector::isRunningArmOnX86() && subdir == QLatin1String("float")) { + // QEMU cheats at qfloat16, so outputs it as if it were a float. + if (actualLine.endsWith(QLatin1String("Actual (operandLeft) : 0.001")) + && expectedLine.endsWith(QLatin1String("Actual (operandLeft) : 0.000999"))) { + return true; + } + } + *errorMessage = msgMismatch(actualLine, expectedLine); return false; } |