From 9906cc57ed3eed64d534f43c677bb16e08561bb6 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Tue, 15 Jan 2019 09:58:34 +0100 Subject: testlib: Add BXPASS and BXFAIL Prioritize blacklisting over QEXPECT_FAIL so that a test that is blacklisted no longer fails if QEXPECT_FAIL returns true unexpectedly. To reflect this state properly, the two values of BXPASS and BXFAIL were added to testlib's output. [ChangeLog][Important Behavior Changes][QtTestLib] Blacklisting of tests will be taken into account for XPASS and XFAIL. A blacklisted test that causes an XPASS will no longer be a fail. Task-number: QTBUG-72928 Change-Id: Ia2232fdc714d405fa3fd9aea6c89eb2836bc5950 Reviewed-by: Edward Welbourne --- tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp | 6 +++--- tests/auto/testlib/selftests/expected_blacklisted.lightxml | 8 ++++---- tests/auto/testlib/selftests/expected_blacklisted.teamcity | 3 +-- tests/auto/testlib/selftests/expected_blacklisted.txt | 6 +++--- tests/auto/testlib/selftests/expected_blacklisted.xml | 8 ++++---- tests/auto/testlib/selftests/expected_blacklisted.xunitxml | 11 +++-------- 6 files changed, 18 insertions(+), 24 deletions(-) (limited to 'tests/auto/testlib/selftests') diff --git a/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp b/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp index 8578752e22..b25489ca00 100644 --- a/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp +++ b/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp @@ -64,14 +64,14 @@ void tst_Blacklisted::fail() void tst_Blacklisted::xfail() { - QEXPECT_FAIL("", "This test should XFAIL then BFAIL", Abort); + QEXPECT_FAIL("", "This test should BXFAIL then BPASS", Abort); QVERIFY(false); } void tst_Blacklisted::xpass() { - QEXPECT_FAIL("", "This test should XPASS", Abort); - QVERIFY2(true, "This test should XPASS, blacklist ignored for XPASS"); + QEXPECT_FAIL("", "This test should BXPASS", Abort); + QVERIFY2(true, "This test should BXPASS"); } void tst_Blacklisted::messages() diff --git a/tests/auto/testlib/selftests/expected_blacklisted.lightxml b/tests/auto/testlib/selftests/expected_blacklisted.lightxml index 4193628e7c..5cf62ed104 100644 --- a/tests/auto/testlib/selftests/expected_blacklisted.lightxml +++ b/tests/auto/testlib/selftests/expected_blacklisted.lightxml @@ -24,15 +24,15 @@ - - + + - - + + diff --git a/tests/auto/testlib/selftests/expected_blacklisted.teamcity b/tests/auto/testlib/selftests/expected_blacklisted.teamcity index 8180a7ce76..42b75b752b 100644 --- a/tests/auto/testlib/selftests/expected_blacklisted.teamcity +++ b/tests/auto/testlib/selftests/expected_blacklisted.teamcity @@ -7,10 +7,9 @@ ##teamcity[testStarted name='fail()' flowId='tst_Blacklisted'] ##teamcity[testFinished name='fail()' flowId='tst_Blacklisted'] ##teamcity[testStarted name='xfail()' flowId='tst_Blacklisted'] -##teamcity[testStdOut name='xfail()' out='XFAIL |[Loc: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp(0)|]: This test should XFAIL then BFAIL' flowId='tst_Blacklisted'] +##teamcity[testFinished name='xfail()' flowId='tst_Blacklisted'] ##teamcity[testFinished name='xfail()' flowId='tst_Blacklisted'] ##teamcity[testStarted name='xpass()' flowId='tst_Blacklisted'] -##teamcity[testFailed name='xpass()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp(0)|]' details='|'true|' returned TRUE unexpectedly. (This test should XPASS, blacklist ignored for XPASS)' flowId='tst_Blacklisted'] ##teamcity[testFinished name='xpass()' flowId='tst_Blacklisted'] ##teamcity[testStarted name='messages()' flowId='tst_Blacklisted'] ##teamcity[testStdOut name='messages()' out='QWARN: This is a warning that should not appear in silent test output|nWARNING |[Loc: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp(0)|]: This is an internal testlib warning that should not appear in silent test output|nQDEBUG: This is a debug message that should not appear in silent test output|nQSYSTEM: This is a critical message that should not appear in silent test output|nQINFO: This is an info message that should not appear in silent test output|nINFO |[Loc: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp(0)|]: This is an internal testlib info message that should not appear in silent test output|nQFATAL: This is a fatal error message that should still appear in silent test output' flowId='tst_Blacklisted'] diff --git a/tests/auto/testlib/selftests/expected_blacklisted.txt b/tests/auto/testlib/selftests/expected_blacklisted.txt index 6fa2403b59..fccaa7d8c3 100644 --- a/tests/auto/testlib/selftests/expected_blacklisted.txt +++ b/tests/auto/testlib/selftests/expected_blacklisted.txt @@ -6,10 +6,10 @@ SKIP : tst_Blacklisted::skip() This test should SKIP Loc: [qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp(0)] BFAIL : tst_Blacklisted::fail() 'false' returned FALSE. (This test should BFAIL) Loc: [qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp(0)] -XFAIL : tst_Blacklisted::xfail() This test should XFAIL then BFAIL +BXFAIL : tst_Blacklisted::xfail() This test should BXFAIL then BPASS Loc: [qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp(0)] BPASS : tst_Blacklisted::xfail() -XPASS : tst_Blacklisted::xpass() 'true' returned TRUE unexpectedly. (This test should XPASS, blacklist ignored for XPASS) +BXPASS : tst_Blacklisted::xpass() 'true' returned TRUE unexpectedly. (This test should BXPASS) Loc: [qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp(0)] QWARN : tst_Blacklisted::messages() This is a warning that should not appear in silent test output WARNING: tst_Blacklisted::messages() This is an internal testlib warning that should not appear in silent test output @@ -22,5 +22,5 @@ INFO : tst_Blacklisted::messages() This is an internal testlib info message th QFATAL : tst_Blacklisted::messages() This is a fatal error message that should still appear in silent test output BFAIL : tst_Blacklisted::messages() Received a fatal error. Loc: [Unknown file(0)] -Totals: 1 passed, 1 failed, 1 skipped, 4 blacklisted, 0ms +Totals: 1 passed, 0 failed, 1 skipped, 5 blacklisted, 0ms ********* Finished testing of tst_Blacklisted ********* diff --git a/tests/auto/testlib/selftests/expected_blacklisted.xml b/tests/auto/testlib/selftests/expected_blacklisted.xml index 443bc6b199..04d7e6c828 100644 --- a/tests/auto/testlib/selftests/expected_blacklisted.xml +++ b/tests/auto/testlib/selftests/expected_blacklisted.xml @@ -26,15 +26,15 @@ - - + + - - + + diff --git a/tests/auto/testlib/selftests/expected_blacklisted.xunitxml b/tests/auto/testlib/selftests/expected_blacklisted.xunitxml index 2752bc18b4..6e192687fb 100644 --- a/tests/auto/testlib/selftests/expected_blacklisted.xunitxml +++ b/tests/auto/testlib/selftests/expected_blacklisted.xunitxml @@ -1,5 +1,5 @@ - + @@ -11,12 +11,8 @@ - - - - - - + + @@ -28,7 +24,6 @@ - -- cgit v1.2.3 From 7dd41b32678b8cedc6e03932ac4330d147f25f4a Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Wed, 30 Jan 2019 12:02:27 +0100 Subject: generate_expected_output.py: placate FutureWarning from python Regexes have long specified that a [ as the first character inside a [...] is just a literal [, but apparently we need to escape it now, to avoid a "nested set" FutureWarning. Change-Id: I76a48c9aafb0684a1d6b0d5284fe9852c9ea0e43 Reviewed-by: Friedemann Kleint Reviewed-by: Samuel Gaist --- tests/auto/testlib/selftests/generate_expected_output.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/testlib/selftests') diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py index 1996416e8c..111870b3fb 100755 --- a/tests/auto/testlib/selftests/generate_expected_output.py +++ b/tests/auto/testlib/selftests/generate_expected_output.py @@ -132,7 +132,7 @@ class Cleaner (object): # Add path to specific sources and to tst_*.cpp if missing (for in-source builds): patterns += ((r'(^|[^/])\b(qtestcase.cpp)\b', r'\1qtbase/src/testlib/\2'), # Add more special cases here, if they show up ! - (r'([[" ])\.\./(counting/tst_counting.cpp)\b', + (r'([\[" ])\.\./(counting/tst_counting.cpp)\b', r'\1' + os.path.sep.join(hereNames + (r'\2',))), # The common pattern: (r'(^|[^/])\b(tst_)?([a-z]+\d*)\.cpp\b', -- cgit v1.2.3 From d84912838c1df383d2a9537aefa34e06a9780f08 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Wed, 16 Jan 2019 13:49:06 +0100 Subject: Add some missing expected_*.tap files for the testlib selftest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only for tests that have existing expected_*.* files for other formats, though. Change-Id: I34ca1900d88454f300e04d849a608c378009489b Reviewed-by: Tor Arne Vestbø --- .../selftests/expected_benchlibcallgrind.tap | 15 ++++++ .../testlib/selftests/expected_benchliboptions.tap | 27 +++++++++++ .../testlib/selftests/expected_blacklisted.tap | 44 ++++++++++++++++++ .../testlib/selftests/expected_differentexec.tap | 21 +++++++++ .../auto/testlib/selftests/expected_multiexec.tap | 45 ++++++++++++++++++ .../testlib/selftests/expected_qexecstringlist.tap | 54 ++++++++++++++++++++++ tests/auto/testlib/selftests/expected_silent.tap | 42 +++++++++++++++++ 7 files changed, 248 insertions(+) create mode 100644 tests/auto/testlib/selftests/expected_benchlibcallgrind.tap create mode 100644 tests/auto/testlib/selftests/expected_benchliboptions.tap create mode 100644 tests/auto/testlib/selftests/expected_blacklisted.tap create mode 100644 tests/auto/testlib/selftests/expected_differentexec.tap create mode 100644 tests/auto/testlib/selftests/expected_multiexec.tap create mode 100644 tests/auto/testlib/selftests/expected_qexecstringlist.tap create mode 100644 tests/auto/testlib/selftests/expected_silent.tap (limited to 'tests/auto/testlib/selftests') diff --git a/tests/auto/testlib/selftests/expected_benchlibcallgrind.tap b/tests/auto/testlib/selftests/expected_benchlibcallgrind.tap new file mode 100644 index 0000000000..953756ac9e --- /dev/null +++ b/tests/auto/testlib/selftests/expected_benchlibcallgrind.tap @@ -0,0 +1,15 @@ +TAP version 13 +# tst_BenchlibCallgrind +TAP version 13 +# tst_BenchlibCallgrind +ok 1 - initTestCase() +ok 2 - twoHundredMillionInstructions() # SKIP This test is only defined for gcc and x86. +ok 3 - cleanupTestCase() +1..3 +# tests 3 +# pass 2 +# fail 0 +1..0 +# tests 0 +# pass 0 +# fail 0 diff --git a/tests/auto/testlib/selftests/expected_benchliboptions.tap b/tests/auto/testlib/selftests/expected_benchliboptions.tap new file mode 100644 index 0000000000..6a006ea881 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_benchliboptions.tap @@ -0,0 +1,27 @@ +TAP version 13 +# tst_BenchlibOptions +ok 1 - initTestCase() +ok 2 - threeEvents() +ok 3 - cleanupTestCase() +1..3 +# tests 3 +# pass 3 +# fail 0 +TAP version 13 +# tst_BenchlibFifteenIterations +ok 1 - initTestCase() +ok 2 - threeEvents() +ok 3 - cleanupTestCase() +1..3 +# tests 3 +# pass 3 +# fail 0 +TAP version 13 +# tst_BenchlibOneHundredMinimum +ok 1 - initTestCase() +ok 2 - threeEvents() +ok 3 - cleanupTestCase() +1..3 +# tests 3 +# pass 3 +# fail 0 diff --git a/tests/auto/testlib/selftests/expected_blacklisted.tap b/tests/auto/testlib/selftests/expected_blacklisted.tap new file mode 100644 index 0000000000..7d3b2b0cc8 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_blacklisted.tap @@ -0,0 +1,44 @@ +TAP version 13 +# tst_Blacklisted +ok 1 - initTestCase() +ok 2 - pass() # TODO +ok 3 - skip() # SKIP This test should SKIP +not ok 4 - fail() # TODO 'false' returned FALSE. (This test should BFAIL) + --- + type: QVERIFY + message: This test should BFAIL + wanted: true (false) + found: false (false) + expected: true (false) + actual: false (false) + at: tst_Blacklisted::fail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:62) + file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp + line: 62 + ... +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) + file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp + line: 68 + ... +ok 5 - xfail() # TODO +ok 6 - xpass() # TODO 'true' returned TRUE unexpectedly. (This test should BXPASS) +# This is a warning that should not appear in silent test output +# This is an internal testlib warning that should not appear in silent test output +# This is a debug message that should not appear in silent test output +# This is a critical message that should not appear in silent test output +# This is an info message that should not appear in silent test output +# This is an internal testlib info message that should not appear in silent test output +# This is a fatal error message that should still appear in silent test output +not ok 7 - messages() # TODO Received a fatal error. + --- + # Received a fatal error. + at: tst_Blacklisted::messages() (Unknown file:0) + file: Unknown file + line: 0 + ... +1..7 +# tests 7 +# pass 1 +# fail 0 diff --git a/tests/auto/testlib/selftests/expected_differentexec.tap b/tests/auto/testlib/selftests/expected_differentexec.tap new file mode 100644 index 0000000000..30ee50bc08 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_differentexec.tap @@ -0,0 +1,21 @@ +********* Start testing of tst_TestA ********* +Config: Using QtTest library +PASS : tst_TestA::initTestCase() +PASS : tst_TestA::slotName() +PASS : tst_TestA::cleanupTestCase() +Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 0ms +********* Finished testing of tst_TestA ********* +********* Start testing of tst_TestA ********* +Config: Using QtTest library +PASS : tst_TestA::initTestCase() +PASS : tst_TestA::slotName() +PASS : tst_TestA::cleanupTestCase() +Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 0ms +********* Finished testing of tst_TestA ********* +********* Start testing of tst_TestB ********* +Config: Using QtTest library +PASS : tst_TestB::initTestCase() +PASS : tst_TestB::slotName() +PASS : tst_TestB::cleanupTestCase() +Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 0ms +********* Finished testing of tst_TestB ********* diff --git a/tests/auto/testlib/selftests/expected_multiexec.tap b/tests/auto/testlib/selftests/expected_multiexec.tap new file mode 100644 index 0000000000..ce6a7b37dd --- /dev/null +++ b/tests/auto/testlib/selftests/expected_multiexec.tap @@ -0,0 +1,45 @@ +TAP version 13 +# tst_Nothing +ok 1 - initTestCase() +ok 2 - nothing() +ok 3 - cleanupTestCase() +1..3 +# tests 3 +# pass 3 +# fail 0 +TAP version 13 +# tst_Nothing +ok 1 - initTestCase() +ok 2 - nothing() +ok 3 - cleanupTestCase() +1..3 +# tests 3 +# pass 3 +# fail 0 +TAP version 13 +# tst_Nothing +ok 1 - initTestCase() +ok 2 - nothing() +ok 3 - cleanupTestCase() +1..3 +# tests 3 +# pass 3 +# fail 0 +TAP version 13 +# tst_Nothing +ok 1 - initTestCase() +ok 2 - nothing() +ok 3 - cleanupTestCase() +1..3 +# tests 3 +# pass 3 +# fail 0 +TAP version 13 +# tst_Nothing +ok 1 - initTestCase() +ok 2 - nothing() +ok 3 - cleanupTestCase() +1..3 +# tests 3 +# pass 3 +# fail 0 diff --git a/tests/auto/testlib/selftests/expected_qexecstringlist.tap b/tests/auto/testlib/selftests/expected_qexecstringlist.tap new file mode 100644 index 0000000000..45aa7c4a3c --- /dev/null +++ b/tests/auto/testlib/selftests/expected_qexecstringlist.tap @@ -0,0 +1,54 @@ +TAP version 13 +# tst_QExecStringList +ok 1 - initTestCase() +ok 2 - testA() +ok 3 - testB(Data1) +ok 4 - testB(Data2) +ok 5 - testB(Data3) +ok 6 - testC() +ok 7 - cleanupTestCase() +1..7 +# tests 7 +# pass 7 +# fail 0 +********* Start testing of tst_QExecStringList ********* +Config: Using QtTest library +PASS : tst_QExecStringList::initTestCase() +PASS : tst_QExecStringList::testA() +PASS : tst_QExecStringList::testB(Data1) +PASS : tst_QExecStringList::testB(Data2) +PASS : tst_QExecStringList::testB(Data3) +PASS : tst_QExecStringList::testC() +PASS : tst_QExecStringList::cleanupTestCase() +Totals: 7 passed, 0 failed, 0 skipped, 0 blacklisted, 0ms +********* Finished testing of tst_QExecStringList ********* +********* Start testing of tst_QExecStringList ********* +Config: Using QtTest library +PASS : tst_QExecStringList::initTestCase() +PASS : tst_QExecStringList::testA() +PASS : tst_QExecStringList::cleanupTestCase() +Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 0ms +********* Finished testing of tst_QExecStringList ********* +********* Start testing of tst_QExecStringList ********* +Config: Using QtTest library +PASS : tst_QExecStringList::initTestCase() +PASS : tst_QExecStringList::testB(Data1) +PASS : tst_QExecStringList::testB(Data2) +PASS : tst_QExecStringList::testB(Data3) +PASS : tst_QExecStringList::cleanupTestCase() +Totals: 5 passed, 0 failed, 0 skipped, 0 blacklisted, 0ms +********* Finished testing of tst_QExecStringList ********* +********* Start testing of tst_QExecStringList ********* +Config: Using QtTest library +PASS : tst_QExecStringList::initTestCase() +PASS : tst_QExecStringList::testB(Data2) +PASS : tst_QExecStringList::cleanupTestCase() +Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 0ms +********* Finished testing of tst_QExecStringList ********* +********* Start testing of tst_QExecStringList ********* +Config: Using QtTest library +PASS : tst_QExecStringList::initTestCase() +PASS : tst_QExecStringList::testC() +PASS : tst_QExecStringList::cleanupTestCase() +Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 0ms +********* Finished testing of tst_QExecStringList ********* diff --git a/tests/auto/testlib/selftests/expected_silent.tap b/tests/auto/testlib/selftests/expected_silent.tap new file mode 100644 index 0000000000..c5f7716390 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_silent.tap @@ -0,0 +1,42 @@ +TAP version 13 +# tst_Silent +ok 1 - initTestCase() +ok 2 - pass() +ok 3 - skip() # SKIP This test should skip +not ok 4 - fail() + --- + type: QVERIFY + message: This test should fail + wanted: true (false) + found: false (false) + expected: true (false) + actual: false (false) + at: tst_Silent::fail() (qtbase/tests/auto/testlib/selftests/silent/tst_silent.cpp:60) + file: qtbase/tests/auto/testlib/selftests/silent/tst_silent.cpp + line: 60 + ... +not ok 5 - xfail() # TODO This test should XFAIL + --- + at: tst_Silent::xfail() (qtbase/tests/auto/testlib/selftests/silent/tst_silent.cpp:66) + file: qtbase/tests/auto/testlib/selftests/silent/tst_silent.cpp + line: 66 + ... +ok 6 - xpass() # TODO 'true' returned TRUE unexpectedly. (This test should XPASS) +# This is a warning that should not appear in silent test output +# This is an internal testlib warning that should not appear in silent test output +# This is a debug message that should not appear in silent test output +# This is a critical message that should not appear in silent test output +# This is an info message that should not appear in silent test output +# This is an internal testlib info message that should not appear in silent test output +# This is a fatal error message that should still appear in silent test output +not ok 7 - messages() + --- + # Received a fatal error. + at: tst_Silent::messages() (Unknown file:0) + file: Unknown file + line: 0 + ... +1..7 +# tests 7 +# pass 3 +# fail 3 -- cgit v1.2.3 From 150c6fb74bb7bc702d1d319a1e9acba6b644944b Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 14 Jan 2019 20:50:41 +0100 Subject: Add testlib selftests for double and for non-finite float and double Tidied up the existing float tests in the process. (In particular, s/SUCCESS/PASS/ since that matches real test output.) These verify that QCOMPARE() handles floats and doubles as intended. Extended the existing qFuzzyCompare tests to probe the boundaries of the ranges of values of both types, in the process. Revised the toString that qCompare() uses to give enough precision to actually show some of the differences being tested there (12 digits, to match what qFuzzyCompare tests, so as to show different values rather than, e.g. 1e12 for both expected and actual) and to give consistent results for infinities and NaN (MinGW had eccentric versions for these, leading to different output from tests, which thus failed); did the latter also for toString and fixed stray zeros in MinGW's exponents (which made a kludge in tst_selftest.cpp redundant, so I removed that, too). That's further complicated handling of floating-point types, so let's just keep an eye on how expensive that's getting by adding a benchmark test for QTest::toString(). Unfortunately, default settings only get runs that take modest numbers of milliseconds (some as low as 40) while increasing this with -minumumvalue 100 or more gets the process killed - and I'm unable to find out who's doing the killing (it's not QProcess::kill, ::kill or the QtTest WatchDog, as far as I can tell). So results are rather noisy; the integral tests exhibit speed-ups by factors up to 5, and slow-downs by factors up to 100, between runs with and without this change, which does not affec the integral tests. The relatively modest slow-downs and speed-ups in the floating point tests thus seem likely to be happenstance rather than signal. Change-Id: I4a6bbbab6a43bf14a4089e96238a7c8da2c3127e Reviewed-by: Ulf Hermann --- .../auto/testlib/selftests/expected_float.lightxml | 403 ++++++++++- tests/auto/testlib/selftests/expected_float.tap | 778 ++++++++++++++++++++- .../auto/testlib/selftests/expected_float.teamcity | 211 +++++- tests/auto/testlib/selftests/expected_float.txt | 258 ++++++- tests/auto/testlib/selftests/expected_float.xml | 403 ++++++++++- .../auto/testlib/selftests/expected_float.xunitxml | 185 ++++- tests/auto/testlib/selftests/float/tst_float.cpp | 150 +++- tests/auto/testlib/selftests/tst_selftests.cpp | 9 - 8 files changed, 2316 insertions(+), 81 deletions(-) (limited to 'tests/auto/testlib/selftests') diff --git a/tests/auto/testlib/selftests/expected_float.lightxml b/tests/auto/testlib/selftests/expected_float.lightxml index 0dbc5dd8c8..79ce33627d 100644 --- a/tests/auto/testlib/selftests/expected_float.lightxml +++ b/tests/auto/testlib/selftests/expected_float.lightxml @@ -7,30 +7,423 @@ - + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Actual (operandLeft) : 99999 + Expected (operandRight): 99998]]> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_float.tap b/tests/auto/testlib/selftests/expected_float.tap index fae2dc9796..1896bb2fb3 100644 --- a/tests/auto/testlib/selftests/expected_float.tap +++ b/tests/auto/testlib/selftests/expected_float.tap @@ -1,8 +1,386 @@ TAP version 13 # tst_float ok 1 - initTestCase() -ok 2 - floatComparisons(should SUCCEED 1) -not ok 3 - floatComparisons(should FAIL 1) +ok 2 - doubleComparisons(should PASS 1) +not ok 3 - doubleComparisons(should FAIL 1) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: 3 (operandRight) + found: 1 (operandLeft) + expected: 3 (operandRight) + actual: 1 (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 4 - doubleComparisons(should FAIL 2) + --- + type: QCOMPARE + message: Compared doubles 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::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +ok 5 - doubleComparisons(should PASS 2) +not ok 6 - doubleComparisons(should FAIL 3) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: 999999999998 (operandRight) + found: 999999999999 (operandLeft) + expected: 999999999998 (operandRight) + actual: 999999999999 (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +ok 7 - doubleComparisons(should PASS 3) +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) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +ok 9 - doubleComparisons(should PASS 4) +not ok 10 - doubleComparisons(should FAIL 5) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: 9.99999999997e+306 (operandRight) + 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) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +ok 11 - doubleComparisons(should PASS: NaN == NaN) +not ok 12 - doubleComparisons(should FAIL: NaN != 0) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: 0 (operandRight) + found: nan (operandLeft) + expected: 0 (operandRight) + actual: nan (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 13 - doubleComparisons(should FAIL: 0 != NaN) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: nan (operandRight) + found: 0 (operandLeft) + expected: nan (operandRight) + actual: 0 (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 14 - doubleComparisons(should FAIL: NaN != 1) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: 1 (operandRight) + found: nan (operandLeft) + expected: 1 (operandRight) + actual: nan (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 15 - doubleComparisons(should FAIL: 1 != NaN) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: nan (operandRight) + found: 1 (operandLeft) + expected: nan (operandRight) + actual: 1 (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +ok 16 - doubleComparisons(should PASS: inf == inf) +ok 17 - doubleComparisons(should PASS: -inf == -inf) +not ok 18 - doubleComparisons(should FAIL: inf != -inf) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: -inf (operandRight) + found: inf (operandLeft) + expected: -inf (operandRight) + actual: inf (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 19 - doubleComparisons(should FAIL: -inf != inf) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: inf (operandRight) + found: -inf (operandLeft) + expected: inf (operandRight) + actual: -inf (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 20 - doubleComparisons(should FAIL: inf != nan) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: nan (operandRight) + found: inf (operandLeft) + expected: nan (operandRight) + actual: inf (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 21 - doubleComparisons(should FAIL: nan != inf) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: inf (operandRight) + found: nan (operandLeft) + expected: inf (operandRight) + actual: nan (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 22 - doubleComparisons(should FAIL: -inf != nan) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: nan (operandRight) + found: -inf (operandLeft) + expected: nan (operandRight) + actual: -inf (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 23 - doubleComparisons(should FAIL: nan != -inf) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: -inf (operandRight) + found: nan (operandLeft) + expected: -inf (operandRight) + actual: nan (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 24 - doubleComparisons(should FAIL: inf != 0) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: 0 (operandRight) + found: inf (operandLeft) + expected: 0 (operandRight) + actual: inf (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 25 - doubleComparisons(should FAIL: 0 != inf) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: inf (operandRight) + found: 0 (operandLeft) + expected: inf (operandRight) + actual: 0 (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 26 - doubleComparisons(should FAIL: -inf != 0) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: 0 (operandRight) + found: -inf (operandLeft) + expected: 0 (operandRight) + actual: -inf (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 27 - doubleComparisons(should FAIL: 0 != -inf) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: -inf (operandRight) + found: 0 (operandLeft) + expected: -inf (operandRight) + actual: 0 (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 28 - doubleComparisons(should FAIL: inf != 1) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: 1 (operandRight) + found: inf (operandLeft) + expected: 1 (operandRight) + actual: inf (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 29 - doubleComparisons(should FAIL: 1 != inf) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: inf (operandRight) + found: 1 (operandLeft) + expected: inf (operandRight) + actual: 1 (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 30 - doubleComparisons(should FAIL: -inf != 1) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: 1 (operandRight) + found: -inf (operandLeft) + expected: 1 (operandRight) + actual: -inf (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 31 - doubleComparisons(should FAIL: 1 != -inf) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: -inf (operandRight) + found: 1 (operandLeft) + expected: -inf (operandRight) + actual: 1 (operandLeft) + at: tst_float::doubleComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 32 - doubleComparisons(should FAIL: inf != max) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: 1.79769313486e+308 (operandRight) + 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) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 33 - doubleComparisons(should FAIL: inf != -max) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: -1.79769313486e+308 (operandRight) + 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) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 34 - doubleComparisons(should FAIL: max != inf) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: inf (operandRight) + 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) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 35 - doubleComparisons(should FAIL: -max != inf) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: inf (operandRight) + 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) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 36 - doubleComparisons(should FAIL: -inf != max) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: 1.79769313486e+308 (operandRight) + 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) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 37 - doubleComparisons(should FAIL: -inf != -max) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: -1.79769313486e+308 (operandRight) + 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) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 38 - doubleComparisons(should FAIL: max != -inf) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: -inf (operandRight) + 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) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 39 - doubleComparisons(should FAIL: -max != -inf) + --- + type: QCOMPARE + message: Compared doubles are not the same (fuzzy compare) + wanted: -inf (operandRight) + 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) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 51 + ... +not ok 40 - floatComparisons(should FAIL 1) --- type: QCOMPARE message: Compared floats are not the same (fuzzy compare) @@ -10,11 +388,12 @@ not ok 3 - 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:48) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 48 + line: 124 ... -not ok 4 - floatComparisons(should FAIL 2) +ok 41 - floatComparisons(should PASS 1) +not ok 42 - floatComparisons(should FAIL 2) --- type: QCOMPARE message: Compared floats are not the same (fuzzy compare) @@ -22,24 +401,365 @@ not ok 4 - 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:48) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +ok 43 - floatComparisons(should PASS 2) +not ok 44 - floatComparisons(should FAIL 3) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: 99998 (operandRight) + found: 99999 (operandLeft) + expected: 99998 (operandRight) + actual: 99999 (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +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:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +ok 47 - floatComparisons(should PASS 4) +not ok 48 - floatComparisons(should FAIL 5) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: 9.9997e+37 (operandRight) + 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) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +ok 49 - floatComparisons(should PASS: NaN == NaN) +not ok 50 - floatComparisons(should FAIL: NaN != 0) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: 0 (operandRight) + found: nan (operandLeft) + expected: 0 (operandRight) + actual: nan (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 51 - floatComparisons(should FAIL: 0 != NaN) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: nan (operandRight) + found: 0 (operandLeft) + expected: nan (operandRight) + actual: 0 (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 52 - floatComparisons(should FAIL: NaN != 1) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: 1 (operandRight) + found: nan (operandLeft) + expected: 1 (operandRight) + actual: nan (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 53 - floatComparisons(should FAIL: 1 != NaN) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: nan (operandRight) + found: 1 (operandLeft) + expected: nan (operandRight) + actual: 1 (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +ok 54 - floatComparisons(should PASS: inf == inf) +ok 55 - floatComparisons(should PASS: -inf == -inf) +not ok 56 - floatComparisons(should FAIL: inf != -inf) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: -inf (operandRight) + found: inf (operandLeft) + expected: -inf (operandRight) + actual: inf (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 57 - floatComparisons(should FAIL: -inf != inf) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: inf (operandRight) + found: -inf (operandLeft) + expected: inf (operandRight) + actual: -inf (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 58 - floatComparisons(should FAIL: inf != nan) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: nan (operandRight) + found: inf (operandLeft) + expected: nan (operandRight) + actual: inf (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 59 - floatComparisons(should FAIL: nan != inf) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: inf (operandRight) + found: nan (operandLeft) + expected: inf (operandRight) + actual: nan (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 60 - floatComparisons(should FAIL: -inf != nan) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: nan (operandRight) + found: -inf (operandLeft) + expected: nan (operandRight) + actual: -inf (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 61 - floatComparisons(should FAIL: nan != -inf) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: -inf (operandRight) + found: nan (operandLeft) + expected: -inf (operandRight) + actual: nan (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 62 - floatComparisons(should FAIL: inf != 0) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: 0 (operandRight) + found: inf (operandLeft) + expected: 0 (operandRight) + actual: inf (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 63 - floatComparisons(should FAIL: 0 != inf) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: inf (operandRight) + found: 0 (operandLeft) + expected: inf (operandRight) + actual: 0 (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 64 - floatComparisons(should FAIL: -inf != 0) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: 0 (operandRight) + found: -inf (operandLeft) + expected: 0 (operandRight) + actual: -inf (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 65 - floatComparisons(should FAIL: 0 != -inf) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: -inf (operandRight) + found: 0 (operandLeft) + expected: -inf (operandRight) + actual: 0 (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 66 - floatComparisons(should FAIL: inf != 1) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: 1 (operandRight) + found: inf (operandLeft) + expected: 1 (operandRight) + actual: inf (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 67 - floatComparisons(should FAIL: 1 != inf) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: inf (operandRight) + found: 1 (operandLeft) + expected: inf (operandRight) + actual: 1 (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 68 - floatComparisons(should FAIL: -inf != 1) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: 1 (operandRight) + found: -inf (operandLeft) + expected: 1 (operandRight) + actual: -inf (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 69 - floatComparisons(should FAIL: 1 != -inf) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: -inf (operandRight) + found: 1 (operandLeft) + expected: -inf (operandRight) + actual: 1 (operandLeft) + at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:124) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 70 - floatComparisons(should FAIL: inf != max) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: 3.40282e+38 (operandRight) + 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) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 71 - floatComparisons(should FAIL: inf != -max) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: -3.40282e+38 (operandRight) + 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) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 72 - floatComparisons(should FAIL: max != inf) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: inf (operandRight) + 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) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 73 - floatComparisons(should FAIL: -max != inf) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: inf (operandRight) + 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) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 74 - floatComparisons(should FAIL: -inf != max) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: 3.40282e+38 (operandRight) + 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) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 75 - floatComparisons(should FAIL: -inf != -max) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: -3.40282e+38 (operandRight) + 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) + file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp + line: 124 + ... +not ok 76 - floatComparisons(should FAIL: max != -inf) + --- + type: QCOMPARE + message: Compared floats are not the same (fuzzy compare) + wanted: -inf (operandRight) + 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) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 48 + line: 124 ... -not ok 5 - floatComparisons(should FAIL 3) +not ok 77 - floatComparisons(should FAIL: -max != -inf) --- type: QCOMPARE message: Compared floats are not the same (fuzzy compare) - wanted: 99999 (operandRight) - found: 99998 (operandLeft) - expected: 99999 (operandRight) - actual: 99998 (operandLeft) - at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:48) + wanted: -inf (operandRight) + 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) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 48 + line: 124 ... -ok 6 - floatComparisons(should SUCCEED 2) -not ok 7 - compareFloatTests(1e0) +not ok 78 - compareFloatTests(1e0) --- type: QCOMPARE message: Compared floats are not the same (fuzzy compare) @@ -47,11 +767,11 @@ not ok 7 - compareFloatTests(1e0) found: 1 (t1) expected: 3 (t3) actual: 1 (t1) - at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:96) + at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:206) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 96 + line: 206 ... -not ok 8 - compareFloatTests(1e-7) +not ok 79 - compareFloatTests(1e-7) --- type: QCOMPARE message: Compared floats are not the same (fuzzy compare) @@ -59,11 +779,11 @@ not ok 8 - 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:96) + at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:206) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 96 + line: 206 ... -not ok 9 - compareFloatTests(1e+7) +not ok 80 - compareFloatTests(1e+7) --- type: QCOMPARE message: Compared floats are not the same (fuzzy compare) @@ -71,12 +791,12 @@ not ok 9 - 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:96) + at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:206) file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp - line: 96 + line: 206 ... -ok 10 - cleanupTestCase() -1..10 -# tests 10 -# pass 4 -# fail 6 +ok 81 - cleanupTestCase() +1..81 +# tests 81 +# pass 16 +# fail 65 diff --git a/tests/auto/testlib/selftests/expected_float.teamcity b/tests/auto/testlib/selftests/expected_float.teamcity index d5b81593d8..9166f644af 100644 --- a/tests/auto/testlib/selftests/expected_float.teamcity +++ b/tests/auto/testlib/selftests/expected_float.teamcity @@ -1,19 +1,220 @@ ##teamcity[testSuiteStarted name='tst_float' flowId='tst_float'] ##teamcity[testStarted name='initTestCase()' flowId='tst_float'] ##teamcity[testFinished name='initTestCase()' flowId='tst_float'] -##teamcity[testStarted name='floatComparisons(should SUCCEED 1)' flowId='tst_float'] -##teamcity[testFinished name='floatComparisons(should SUCCEED 1)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should PASS 1)' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should PASS 1)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL 1)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL 1)' 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) : 1|n Expected (operandRight): 3' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL 1)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL 2)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL 2)' 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-07|n Expected (operandRight): 3e-07' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL 2)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should PASS 2)' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should PASS 2)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL 3)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL 3)' 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) : 999999999999|n Expected (operandRight): 999999999998' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL 3)' flowId='tst_float'] +##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[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'] +##teamcity[testStarted name='doubleComparisons(should FAIL 5)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL 5)' 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+306|n Expected (operandRight): 9.99999999997e+306' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL 5)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should PASS: NaN == NaN)' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should PASS: NaN == NaN)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: NaN != 0)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: NaN != 0)' 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) : nan|n Expected (operandRight): 0' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: NaN != 0)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: 0 != NaN)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: 0 != NaN)' 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) : 0|n Expected (operandRight): nan' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: 0 != NaN)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: NaN != 1)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: NaN != 1)' 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) : nan|n Expected (operandRight): 1' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: NaN != 1)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: 1 != NaN)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: 1 != NaN)' 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) : 1|n Expected (operandRight): nan' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: 1 != NaN)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should PASS: inf == inf)' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should PASS: inf == inf)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should PASS: -inf == -inf)' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should PASS: -inf == -inf)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: inf != -inf)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: inf != -inf)' 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) : inf|n Expected (operandRight): -inf' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: inf != -inf)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: -inf != inf)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: -inf != inf)' 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) : -inf|n Expected (operandRight): inf' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: -inf != inf)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: inf != nan)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: inf != nan)' 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) : inf|n Expected (operandRight): nan' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: inf != nan)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: nan != inf)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: nan != inf)' 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) : nan|n Expected (operandRight): inf' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: nan != inf)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: -inf != nan)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: -inf != nan)' 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) : -inf|n Expected (operandRight): nan' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: -inf != nan)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: nan != -inf)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: nan != -inf)' 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) : nan|n Expected (operandRight): -inf' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: nan != -inf)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: inf != 0)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: inf != 0)' 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) : inf|n Expected (operandRight): 0' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: inf != 0)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: 0 != inf)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: 0 != inf)' 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) : 0|n Expected (operandRight): inf' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: 0 != inf)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: -inf != 0)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: -inf != 0)' 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) : -inf|n Expected (operandRight): 0' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: -inf != 0)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: 0 != -inf)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: 0 != -inf)' 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) : 0|n Expected (operandRight): -inf' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: 0 != -inf)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: inf != 1)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: inf != 1)' 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) : inf|n Expected (operandRight): 1' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: inf != 1)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: 1 != inf)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: 1 != inf)' 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) : 1|n Expected (operandRight): inf' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: 1 != inf)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: -inf != 1)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: -inf != 1)' 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) : -inf|n Expected (operandRight): 1' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: -inf != 1)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: 1 != -inf)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: 1 != -inf)' 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) : 1|n Expected (operandRight): -inf' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: 1 != -inf)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: inf != max)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: inf != max)' 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) : inf|n Expected (operandRight): 1.79769313486e+308' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: inf != max)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: inf != -max)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: inf != -max)' 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) : inf|n Expected (operandRight): -1.79769313486e+308' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: inf != -max)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: max != inf)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: max != inf)' 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) : 1.79769313486e+308|n Expected (operandRight): inf' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: max != inf)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: -max != inf)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: -max != inf)' 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) : -1.79769313486e+308|n Expected (operandRight): inf' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: -max != inf)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: -inf != max)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: -inf != max)' 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) : -inf|n Expected (operandRight): 1.79769313486e+308' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: -inf != max)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: -inf != -max)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: -inf != -max)' 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) : -inf|n Expected (operandRight): -1.79769313486e+308' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: -inf != -max)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: max != -inf)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: max != -inf)' 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) : 1.79769313486e+308|n Expected (operandRight): -inf' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: max != -inf)' flowId='tst_float'] +##teamcity[testStarted name='doubleComparisons(should FAIL: -max != -inf)' flowId='tst_float'] +##teamcity[testFailed name='doubleComparisons(should FAIL: -max != -inf)' 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) : -1.79769313486e+308|n Expected (operandRight): -inf' flowId='tst_float'] +##teamcity[testFinished name='doubleComparisons(should FAIL: -max != -inf)' flowId='tst_float'] ##teamcity[testStarted name='floatComparisons(should FAIL 1)' flowId='tst_float'] ##teamcity[testFailed name='floatComparisons(should FAIL 1)' 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|n Expected (operandRight): 3' flowId='tst_float'] ##teamcity[testFinished name='floatComparisons(should FAIL 1)' flowId='tst_float'] +##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[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'] ##teamcity[testStarted name='floatComparisons(should FAIL 3)' flowId='tst_float'] -##teamcity[testFailed name='floatComparisons(should FAIL 3)' 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) : 99998|n Expected (operandRight): 99999' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL 3)' 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) : 99999|n Expected (operandRight): 99998' flowId='tst_float'] ##teamcity[testFinished name='floatComparisons(should FAIL 3)' flowId='tst_float'] -##teamcity[testStarted name='floatComparisons(should SUCCEED 2)' flowId='tst_float'] -##teamcity[testFinished name='floatComparisons(should SUCCEED 2)' flowId='tst_float'] +##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[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'] +##teamcity[testStarted name='floatComparisons(should FAIL 5)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL 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 (operandLeft) : 9.9999e+37|n Expected (operandRight): 9.9997e+37' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL 5)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should PASS: NaN == NaN)' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should PASS: NaN == NaN)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: NaN != 0)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: NaN != 0)' 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) : nan|n Expected (operandRight): 0' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: NaN != 0)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: 0 != NaN)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: 0 != NaN)' 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) : 0|n Expected (operandRight): nan' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: 0 != NaN)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: NaN != 1)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: NaN != 1)' 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) : nan|n Expected (operandRight): 1' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: NaN != 1)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: 1 != NaN)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: 1 != NaN)' 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|n Expected (operandRight): nan' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: 1 != NaN)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should PASS: inf == inf)' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should PASS: inf == inf)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should PASS: -inf == -inf)' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should PASS: -inf == -inf)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: inf != -inf)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: inf != -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) : inf|n Expected (operandRight): -inf' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: inf != -inf)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: -inf != inf)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: -inf != 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) : -inf|n Expected (operandRight): inf' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: -inf != inf)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: inf != nan)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: inf != nan)' 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) : inf|n Expected (operandRight): nan' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: inf != nan)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: nan != inf)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: nan != 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) : nan|n Expected (operandRight): inf' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: nan != inf)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: -inf != nan)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: -inf != nan)' 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) : -inf|n Expected (operandRight): nan' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: -inf != nan)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: nan != -inf)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: nan != -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) : nan|n Expected (operandRight): -inf' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: nan != -inf)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: inf != 0)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: inf != 0)' 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) : inf|n Expected (operandRight): 0' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: inf != 0)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: 0 != inf)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: 0 != 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) : 0|n Expected (operandRight): inf' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: 0 != inf)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: -inf != 0)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: -inf != 0)' 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) : -inf|n Expected (operandRight): 0' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: -inf != 0)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: 0 != -inf)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: 0 != -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) : 0|n Expected (operandRight): -inf' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: 0 != -inf)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: inf != 1)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: inf != 1)' 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) : inf|n Expected (operandRight): 1' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: inf != 1)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: 1 != inf)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: 1 != 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) : 1|n Expected (operandRight): inf' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: 1 != inf)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: -inf != 1)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: -inf != 1)' 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) : -inf|n Expected (operandRight): 1' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: -inf != 1)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: 1 != -inf)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: 1 != -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) : 1|n Expected (operandRight): -inf' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: 1 != -inf)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: inf != max)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: inf != max)' 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) : inf|n Expected (operandRight): 3.40282e+38' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: inf != max)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: inf != -max)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: inf != -max)' 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) : inf|n Expected (operandRight): -3.40282e+38' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: inf != -max)' flowId='tst_float'] +##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='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='floatComparisons(should FAIL: -inf != max)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: -inf != max)' 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) : -inf|n Expected (operandRight): 3.40282e+38' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: -inf != max)' flowId='tst_float'] +##teamcity[testStarted name='floatComparisons(should FAIL: -inf != -max)' flowId='tst_float'] +##teamcity[testFailed name='floatComparisons(should FAIL: -inf != -max)' 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) : -inf|n Expected (operandRight): -3.40282e+38' flowId='tst_float'] +##teamcity[testFinished name='floatComparisons(should FAIL: -inf != -max)' flowId='tst_float'] +##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='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='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 8abea6a67e..3134196a9c 100644 --- a/tests/auto/testlib/selftests/expected_float.txt +++ b/tests/auto/testlib/selftests/expected_float.txt @@ -1,20 +1,268 @@ ********* Start testing of tst_float ********* Config: Using QtTest library PASS : tst_float::initTestCase() -PASS : tst_float::floatComparisons(should SUCCEED 1) +PASS : tst_float::doubleComparisons(should PASS 1) +FAIL! : tst_float::doubleComparisons(should FAIL 1) Compared doubles 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::doubleComparisons(should FAIL 2) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : 1e-07 + Expected (operandRight): 3e-07 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +PASS : tst_float::doubleComparisons(should PASS 2) +FAIL! : tst_float::doubleComparisons(should FAIL 3) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : 999999999999 + Expected (operandRight): 999999999998 + 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 + 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) + Actual (operandLeft) : 9.99999999999e+306 + Expected (operandRight): 9.99999999997e+306 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +PASS : tst_float::doubleComparisons(should PASS: NaN == NaN) +FAIL! : tst_float::doubleComparisons(should FAIL: NaN != 0) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : nan + Expected (operandRight): 0 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: 0 != NaN) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : 0 + Expected (operandRight): nan + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: NaN != 1) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : nan + Expected (operandRight): 1 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: 1 != NaN) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : 1 + Expected (operandRight): nan + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +PASS : tst_float::doubleComparisons(should PASS: inf == inf) +PASS : tst_float::doubleComparisons(should PASS: -inf == -inf) +FAIL! : tst_float::doubleComparisons(should FAIL: inf != -inf) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : inf + Expected (operandRight): -inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: -inf != inf) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : -inf + Expected (operandRight): inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: inf != nan) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : inf + Expected (operandRight): nan + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: nan != inf) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : nan + Expected (operandRight): inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: -inf != nan) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : -inf + Expected (operandRight): nan + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: nan != -inf) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : nan + Expected (operandRight): -inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: inf != 0) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : inf + Expected (operandRight): 0 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: 0 != inf) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : 0 + Expected (operandRight): inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: -inf != 0) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : -inf + Expected (operandRight): 0 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: 0 != -inf) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : 0 + Expected (operandRight): -inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: inf != 1) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : inf + Expected (operandRight): 1 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: 1 != inf) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : 1 + Expected (operandRight): inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: -inf != 1) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : -inf + Expected (operandRight): 1 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: 1 != -inf) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : 1 + Expected (operandRight): -inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: inf != max) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : inf + Expected (operandRight): 1.79769313486e+308 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: inf != -max) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : inf + Expected (operandRight): -1.79769313486e+308 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: max != inf) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : 1.79769313486e+308 + Expected (operandRight): inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: -max != inf) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : -1.79769313486e+308 + Expected (operandRight): inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: -inf != max) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : -inf + Expected (operandRight): 1.79769313486e+308 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: -inf != -max) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : -inf + Expected (operandRight): -1.79769313486e+308 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: max != -inf) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : 1.79769313486e+308 + Expected (operandRight): -inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::doubleComparisons(should FAIL: -max != -inf) Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : -1.79769313486e+308 + Expected (operandRight): -inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] FAIL! : tst_float::floatComparisons(should FAIL 1) Compared floats are not the same (fuzzy compare) Actual (operandLeft) : 1 Expected (operandRight): 3 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 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) - Actual (operandLeft) : 99998 - Expected (operandRight): 99999 + Actual (operandLeft) : 99999 + Expected (operandRight): 99998 + 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 + 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) + Actual (operandLeft) : 9.9999e+37 + Expected (operandRight): 9.9997e+37 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +PASS : tst_float::floatComparisons(should PASS: NaN == NaN) +FAIL! : tst_float::floatComparisons(should FAIL: NaN != 0) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : nan + Expected (operandRight): 0 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: 0 != NaN) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : 0 + Expected (operandRight): nan + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: NaN != 1) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : nan + Expected (operandRight): 1 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: 1 != NaN) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : 1 + Expected (operandRight): nan + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +PASS : tst_float::floatComparisons(should PASS: inf == inf) +PASS : tst_float::floatComparisons(should PASS: -inf == -inf) +FAIL! : tst_float::floatComparisons(should FAIL: inf != -inf) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : inf + Expected (operandRight): -inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: -inf != inf) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : -inf + Expected (operandRight): inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: inf != nan) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : inf + Expected (operandRight): nan + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: nan != inf) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : nan + Expected (operandRight): inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: -inf != nan) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : -inf + Expected (operandRight): nan + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: nan != -inf) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : nan + Expected (operandRight): -inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: inf != 0) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : inf + Expected (operandRight): 0 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: 0 != inf) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : 0 + Expected (operandRight): inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: -inf != 0) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : -inf + Expected (operandRight): 0 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: 0 != -inf) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : 0 + Expected (operandRight): -inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: inf != 1) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : inf + Expected (operandRight): 1 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: 1 != inf) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : 1 + Expected (operandRight): inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: -inf != 1) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : -inf + Expected (operandRight): 1 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: 1 != -inf) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : 1 + Expected (operandRight): -inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: inf != max) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : inf + Expected (operandRight): 3.40282e+38 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: inf != -max) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : inf + Expected (operandRight): -3.40282e+38 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: max != inf) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : 3.40282e+38 + Expected (operandRight): inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: -max != inf) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : -3.40282e+38 + Expected (operandRight): inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: -inf != max) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : -inf + Expected (operandRight): 3.40282e+38 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: -inf != -max) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : -inf + Expected (operandRight): -3.40282e+38 + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: max != -inf) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : 3.40282e+38 + Expected (operandRight): -inf + Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] +FAIL! : tst_float::floatComparisons(should FAIL: -max != -inf) Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : -3.40282e+38 + Expected (operandRight): -inf Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)] -PASS : tst_float::floatComparisons(should SUCCEED 2) FAIL! : tst_float::compareFloatTests(1e0) Compared floats are not the same (fuzzy compare) Actual (t1): 1 Expected (t3): 3 @@ -28,5 +276,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: 4 passed, 6 failed, 0 skipped, 0 blacklisted, 0ms +Totals: 16 passed, 65 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 096e1a5b54..da934eead3 100644 --- a/tests/auto/testlib/selftests/expected_float.xml +++ b/tests/auto/testlib/selftests/expected_float.xml @@ -9,30 +9,423 @@ - + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Actual (operandLeft) : 99999 + Expected (operandRight): 99998]]> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_float.xunitxml b/tests/auto/testlib/selftests/expected_float.xunitxml index 5de14e8d9b..ba96b16fe6 100644 --- a/tests/auto/testlib/selftests/expected_float.xunitxml +++ b/tests/auto/testlib/selftests/expected_float.xunitxml @@ -1,11 +1,106 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Actual (operandLeft) : 99999 + Expected (operandRight): 99998" result="fail"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + ("operandRight"); + + QTest::newRow("should PASS 1") << 0. << 0.; + QTest::newRow("should FAIL 1") << 1.00000 << 3.00000; + QTest::newRow("should FAIL 2") << 1.00000e-7 << 3.00000e-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. + + QTest::newRow("should PASS 2") << 1e12 + 1. << 1e12 + 2.; + QTest::newRow("should FAIL 3") << 1e12 - 1. << 1e12 - 2.; + // ... 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 PASS 4") << 1e307 + 1e295 << 1e307 + 2e295; + QTest::newRow("should FAIL 5") << 1e307 - 1e295 << 1e307 - 3e295; + + // QCOMPARE special-cases non-finite values + if (std::numeric_limits::has_quiet_NaN) { + const double nan = std::numeric_limits::quiet_NaN(); + QTest::newRow("should PASS: NaN == NaN") << nan << nan; + QTest::newRow("should FAIL: NaN != 0") << nan << 0.; + QTest::newRow("should FAIL: 0 != NaN") << 0. << nan; + QTest::newRow("should FAIL: NaN != 1") << nan << 1.; + QTest::newRow("should FAIL: 1 != NaN") << 1. << nan; + } + if (std::numeric_limits::has_infinity) { + const double uge = std::numeric_limits::infinity(); + QTest::newRow("should PASS: inf == inf") << uge << uge; + QTest::newRow("should PASS: -inf == -inf") << -uge << -uge; + QTest::newRow("should FAIL: inf != -inf") << uge << -uge; + QTest::newRow("should FAIL: -inf != inf") << -uge << uge; + if (std::numeric_limits::has_quiet_NaN) { + const double nan = std::numeric_limits::quiet_NaN(); + QTest::newRow("should FAIL: inf != nan") << uge << nan; + QTest::newRow("should FAIL: nan != inf") << nan << uge; + QTest::newRow("should FAIL: -inf != nan") << -uge << nan; + QTest::newRow("should FAIL: nan != -inf") << nan << -uge; + } + QTest::newRow("should FAIL: inf != 0") << uge << 0.; + QTest::newRow("should FAIL: 0 != inf") << 0. << uge; + QTest::newRow("should FAIL: -inf != 0") << -uge << 0.; + QTest::newRow("should FAIL: 0 != -inf") << 0. << -uge; + QTest::newRow("should FAIL: inf != 1") << uge << 1.; + QTest::newRow("should FAIL: 1 != inf") << 1. << uge; + QTest::newRow("should FAIL: -inf != 1") << -uge << 1.; + QTest::newRow("should FAIL: 1 != -inf") << 1. << -uge; + + const double big = std::numeric_limits::max(); + QTest::newRow("should FAIL: inf != max") << uge << big; + QTest::newRow("should FAIL: inf != -max") << uge << -big; + QTest::newRow("should FAIL: max != inf") << big << uge; + QTest::newRow("should FAIL: -max != inf") << -big << uge; + QTest::newRow("should FAIL: -inf != max") << -uge << big; + QTest::newRow("should FAIL: -inf != -max") << -uge << -big; + QTest::newRow("should FAIL: max != -inf") << big << -uge; + QTest::newRow("should FAIL: -max != -inf") << -big << -uge; + } +} + void tst_float::floatComparisons() const { QFETCH(float, operandLeft); @@ -53,30 +129,64 @@ void tst_float::floatComparisons_data() const QTest::addColumn("operandLeft"); QTest::addColumn("operandRight"); - QTest::newRow("should SUCCEED 1") - << float(0) - << float(0); - - QTest::newRow("should FAIL 1") - << float(1.00000) - << float(3.00000); - - QTest::newRow("should FAIL 2") - << float(1.00000e-7f) - << float(3.00000e-7f); + QTest::newRow("should FAIL 1") << 1.00000f << 3.00000f; + QTest::newRow("should PASS 1") << 0.f << 0.f; + QTest::newRow("should FAIL 2") << 1.00000e-7f << 3.00000e-7f; // QCOMPARE for floats uses qFuzzyCompare(), which succeeds if the numbers - // differ by no more than 1/100,000th of the smaller value. Thus - // QCOMPARE(99998, 99999) should fail, while QCOMPARE(100001, 100002) + // 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. - QTest::newRow("should FAIL 3") - << float(99998) - << float(99999); - - QTest::newRow("should SUCCEED 2") - << float(100001) - << float(100002); + QTest::newRow("should PASS 2") << 1e5f + 1.f << 1e5f + 2.f; + QTest::newRow("should FAIL 3") << 1e5f - 1.f << 1e5f - 2.f; + // ... 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 PASS 4") << 1e38f + 1e33f << 1e38f + 2e33f; + QTest::newRow("should FAIL 5") << 1e38f - 1e33f << 1e38f - 3e33f; + + // QCOMPARE special-cases non-finite values + if (std::numeric_limits::has_quiet_NaN) { + const float nan = std::numeric_limits::quiet_NaN(); + QTest::newRow("should PASS: NaN == NaN") << nan << nan; + QTest::newRow("should FAIL: NaN != 0") << nan << 0.f; + QTest::newRow("should FAIL: 0 != NaN") << 0.f << nan; + QTest::newRow("should FAIL: NaN != 1") << nan << 1.f; + QTest::newRow("should FAIL: 1 != NaN") << 1.f << nan; + } + if (std::numeric_limits::has_infinity) { + const float uge = std::numeric_limits::infinity(); + QTest::newRow("should PASS: inf == inf") << uge << uge; + QTest::newRow("should PASS: -inf == -inf") << -uge << -uge; + QTest::newRow("should FAIL: inf != -inf") << uge << -uge; + QTest::newRow("should FAIL: -inf != inf") << -uge << uge; + if (std::numeric_limits::has_quiet_NaN) { + const float nan = std::numeric_limits::quiet_NaN(); + QTest::newRow("should FAIL: inf != nan") << uge << nan; + QTest::newRow("should FAIL: nan != inf") << nan << uge; + QTest::newRow("should FAIL: -inf != nan") << -uge << nan; + QTest::newRow("should FAIL: nan != -inf") << nan << -uge; + } + QTest::newRow("should FAIL: inf != 0") << uge << 0.f; + QTest::newRow("should FAIL: 0 != inf") << 0.f << uge; + QTest::newRow("should FAIL: -inf != 0") << -uge << 0.f; + QTest::newRow("should FAIL: 0 != -inf") << 0.f << -uge; + QTest::newRow("should FAIL: inf != 1") << uge << 1.f; + QTest::newRow("should FAIL: 1 != inf") << 1.f << uge; + QTest::newRow("should FAIL: -inf != 1") << -uge << 1.f; + QTest::newRow("should FAIL: 1 != -inf") << 1.f << -uge; + + const float big = std::numeric_limits::max(); + QTest::newRow("should FAIL: inf != max") << uge << big; + QTest::newRow("should FAIL: inf != -max") << uge << -big; + QTest::newRow("should FAIL: max != inf") << big << uge; + QTest::newRow("should FAIL: -max != inf") << -big << uge; + QTest::newRow("should FAIL: -inf != max") << -uge << big; + QTest::newRow("should FAIL: -inf != -max") << -uge << -big; + QTest::newRow("should FAIL: max != -inf") << big << -uge; + QTest::newRow("should FAIL: -max != -inf") << -big << -uge; + } } void tst_float::compareFloatTests() const diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index 08c6dec191..8baca5bdad 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -782,15 +782,6 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge QString expectedFileName = expectedFileNameFromTest(subdir, logger); QByteArrayList exp = expectedResult(expectedFileName); if (!exp.isEmpty()) { -#ifdef Q_CC_MINGW - // MinGW formats double numbers differently (last verified with 7.1) - if (n == 0 && subdir == QStringLiteral("float")) { - for (int i = 0; i < exp.size(); ++i) { - exp[i].replace("e-07", "e-007"); - exp[i].replace("e+07", "e+007"); - } - } -#endif if (!compareOutput(logger, subdir, actualOutputs[n], res, exp, &errorMessage)) { errorMessage.prepend(QLatin1Char('"') + logger + QLatin1String("\", ") + expectedFileName + QLatin1Char(' ')); -- cgit v1.2.3