summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2019-01-14 20:50:41 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2019-02-06 10:11:22 +0000
commit150c6fb74bb7bc702d1d319a1e9acba6b644944b (patch)
tree71a970f572fe318ae68468096d1ec9161ab8eccc /tests/auto/testlib
parentf6edb0ef721c5c3734c2c05352febf0f9003ef6a (diff)
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<double> 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<float> 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 <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/testlib')
-rw-r--r--tests/auto/testlib/selftests/expected_float.lightxml403
-rw-r--r--tests/auto/testlib/selftests/expected_float.tap778
-rw-r--r--tests/auto/testlib/selftests/expected_float.teamcity211
-rw-r--r--tests/auto/testlib/selftests/expected_float.txt258
-rw-r--r--tests/auto/testlib/selftests/expected_float.xml403
-rw-r--r--tests/auto/testlib/selftests/expected_float.xunitxml185
-rw-r--r--tests/auto/testlib/selftests/float/tst_float.cpp150
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp9
8 files changed, 2316 insertions, 81 deletions
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 @@
<Incident type="pass" file="" line="0" />
<Duration msecs="0"/>
</TestFunction>
-<TestFunction name="floatComparisons">
+<TestFunction name="doubleComparisons">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS 1]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 1]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): 3]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 2]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1e-07
+ Expected (operandRight): 3e-07]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS 2]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 3]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 999999999999
+ Expected (operandRight): 999999999998]]></Description>
+</Incident>
<Incident type="pass" file="" line="0">
- <DataTag><![CDATA[should SUCCEED 1]]></DataTag>
+ <DataTag><![CDATA[should PASS 3]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 4]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 9.99999999999e-311
+ Expected (operandRight): 9.99999999997e-311]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS 4]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 5]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 9.99999999999e+306
+ Expected (operandRight): 9.99999999997e+306]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS: NaN == NaN]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: NaN != 0]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): 0]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 0 != NaN]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): nan]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: NaN != 1]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): 1]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 1 != NaN]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): nan]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS: inf == inf]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS: -inf == -inf]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != -inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != nan]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): nan]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: nan != inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): inf]]></Description>
</Incident>
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != nan]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): nan]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: nan != -inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != 0]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 0]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 0 != inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != 0]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): 0]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 0 != -inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != 1]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 1]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 1 != inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != 1]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): 1]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 1 != -inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != max]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 1.79769313486e+308]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != -max]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): -1.79769313486e+308]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: max != inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1.79769313486e+308
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -max != inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : -1.79769313486e+308
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != max]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): 1.79769313486e+308]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != -max]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): -1.79769313486e+308]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: max != -inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1.79769313486e+308
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -max != -inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : -1.79769313486e+308
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="floatComparisons">
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
<DataTag><![CDATA[should FAIL 1]]></DataTag>
<Description><![CDATA[Compared floats are not the same (fuzzy compare)
Actual (operandLeft) : 1
Expected (operandRight): 3]]></Description>
</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS 1]]></DataTag>
+</Incident>
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
<DataTag><![CDATA[should FAIL 2]]></DataTag>
<Description><![CDATA[Compared floats are not the same (fuzzy compare)
Actual (operandLeft) : 1e-07
Expected (operandRight): 3e-07]]></Description>
</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS 2]]></DataTag>
+</Incident>
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
<DataTag><![CDATA[should FAIL 3]]></DataTag>
<Description><![CDATA[Compared floats are not the same (fuzzy compare)
- Actual (operandLeft) : 99998
- Expected (operandRight): 99999]]></Description>
+ Actual (operandLeft) : 99999
+ Expected (operandRight): 99998]]></Description>
</Incident>
<Incident type="pass" file="" line="0">
- <DataTag><![CDATA[should SUCCEED 2]]></DataTag>
+ <DataTag><![CDATA[should PASS 3]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 4]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 9.9999e-40
+ Expected (operandRight): 9.99971e-40]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS 4]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 5]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 9.9999e+37
+ Expected (operandRight): 9.9997e+37]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS: NaN == NaN]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: NaN != 0]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): 0]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 0 != NaN]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): nan]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: NaN != 1]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): 1]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 1 != NaN]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): nan]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS: inf == inf]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS: -inf == -inf]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != -inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != nan]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): nan]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: nan != inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != nan]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): nan]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: nan != -inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != 0]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 0]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 0 != inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != 0]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): 0]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 0 != -inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != 1]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 1]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 1 != inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != 1]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): 1]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 1 != -inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != max]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 3.40282e+38]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != -max]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): -3.40282e+38]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: max != inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 3.40282e+38
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -max != inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : -3.40282e+38
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != max]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): 3.40282e+38]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != -max]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): -3.40282e+38]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: max != -inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 3.40282e+38
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -max != -inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : -3.40282e+38
+ Expected (operandRight): -inf]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
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 @@
<Incident type="pass" file="" line="0" />
<Duration msecs="0"/>
</TestFunction>
-<TestFunction name="floatComparisons">
+<TestFunction name="doubleComparisons">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS 1]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 1]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): 3]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 2]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1e-07
+ Expected (operandRight): 3e-07]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS 2]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 3]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 999999999999
+ Expected (operandRight): 999999999998]]></Description>
+</Incident>
<Incident type="pass" file="" line="0">
- <DataTag><![CDATA[should SUCCEED 1]]></DataTag>
+ <DataTag><![CDATA[should PASS 3]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 4]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 9.99999999999e-311
+ Expected (operandRight): 9.99999999997e-311]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS 4]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 5]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 9.99999999999e+306
+ Expected (operandRight): 9.99999999997e+306]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS: NaN == NaN]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: NaN != 0]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): 0]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 0 != NaN]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): nan]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: NaN != 1]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): 1]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 1 != NaN]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): nan]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS: inf == inf]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS: -inf == -inf]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != -inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != nan]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): nan]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: nan != inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): inf]]></Description>
</Incident>
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != nan]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): nan]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: nan != -inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != 0]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 0]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 0 != inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != 0]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): 0]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 0 != -inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != 1]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 1]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 1 != inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != 1]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): 1]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 1 != -inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != max]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 1.79769313486e+308]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != -max]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): -1.79769313486e+308]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: max != inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1.79769313486e+308
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -max != inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : -1.79769313486e+308
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != max]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): 1.79769313486e+308]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != -max]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): -1.79769313486e+308]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: max != -inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1.79769313486e+308
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -max != -inf]]></DataTag>
+ <Description><![CDATA[Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : -1.79769313486e+308
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="floatComparisons">
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
<DataTag><![CDATA[should FAIL 1]]></DataTag>
<Description><![CDATA[Compared floats are not the same (fuzzy compare)
Actual (operandLeft) : 1
Expected (operandRight): 3]]></Description>
</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS 1]]></DataTag>
+</Incident>
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
<DataTag><![CDATA[should FAIL 2]]></DataTag>
<Description><![CDATA[Compared floats are not the same (fuzzy compare)
Actual (operandLeft) : 1e-07
Expected (operandRight): 3e-07]]></Description>
</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS 2]]></DataTag>
+</Incident>
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
<DataTag><![CDATA[should FAIL 3]]></DataTag>
<Description><![CDATA[Compared floats are not the same (fuzzy compare)
- Actual (operandLeft) : 99998
- Expected (operandRight): 99999]]></Description>
+ Actual (operandLeft) : 99999
+ Expected (operandRight): 99998]]></Description>
</Incident>
<Incident type="pass" file="" line="0">
- <DataTag><![CDATA[should SUCCEED 2]]></DataTag>
+ <DataTag><![CDATA[should PASS 3]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 4]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 9.9999e-40
+ Expected (operandRight): 9.99971e-40]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS 4]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 5]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 9.9999e+37
+ Expected (operandRight): 9.9997e+37]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS: NaN == NaN]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: NaN != 0]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): 0]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 0 != NaN]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): nan]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: NaN != 1]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): 1]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 1 != NaN]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): nan]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS: inf == inf]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should PASS: -inf == -inf]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != -inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != nan]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): nan]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: nan != inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != nan]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): nan]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: nan != -inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != 0]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 0]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 0 != inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != 0]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): 0]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 0 != -inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != 1]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 1]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 1 != inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != 1]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): 1]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: 1 != -inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != max]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 3.40282e+38]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: inf != -max]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): -3.40282e+38]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: max != inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 3.40282e+38
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -max != inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : -3.40282e+38
+ Expected (operandRight): inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != max]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): 3.40282e+38]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -inf != -max]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : -inf
+ Expected (operandRight): -3.40282e+38]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: max != -inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 3.40282e+38
+ Expected (operandRight): -inf]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL: -max != -inf]]></DataTag>
+ <Description><![CDATA[Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : -3.40282e+38
+ Expected (operandRight): -inf]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
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 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<testsuite errors="0" failures="6" tests="4" name="tst_float">
+<testsuite errors="0" failures="65" tests="5" name="tst_float">
<properties>
<property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
<property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
<property value="" name="QtBuild"/>
</properties>
<testcase result="pass" name="initTestCase"/>
+ <testcase result="fail" name="doubleComparisons">
+ <failure tag="should FAIL 1" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): 3" result="fail"/>
+ <failure tag="should FAIL 2" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1e&#x002D;07
+ Expected (operandRight): 3e&#x002D;07" result="fail"/>
+ <failure tag="should FAIL 3" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 999999999999
+ Expected (operandRight): 999999999998" result="fail"/>
+ <failure tag="should FAIL 4" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 9.99999999999e&#x002D;311
+ Expected (operandRight): 9.99999999997e&#x002D;311" result="fail"/>
+ <failure tag="should FAIL 5" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 9.99999999999e+306
+ Expected (operandRight): 9.99999999997e+306" result="fail"/>
+ <failure tag="should FAIL: NaN != 0" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): 0" result="fail"/>
+ <failure tag="should FAIL: 0 != NaN" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): nan" result="fail"/>
+ <failure tag="should FAIL: NaN != 1" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): 1" result="fail"/>
+ <failure tag="should FAIL: 1 != NaN" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): nan" result="fail"/>
+ <failure tag="should FAIL: inf != &#x002D;inf" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): &#x002D;inf" result="fail"/>
+ <failure tag="should FAIL: &#x002D;inf != inf" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : &#x002D;inf
+ Expected (operandRight): inf" result="fail"/>
+ <failure tag="should FAIL: inf != nan" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): nan" result="fail"/>
+ <failure tag="should FAIL: nan != inf" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): inf" result="fail"/>
+ <failure tag="should FAIL: &#x002D;inf != nan" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : &#x002D;inf
+ Expected (operandRight): nan" result="fail"/>
+ <failure tag="should FAIL: nan != &#x002D;inf" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): &#x002D;inf" result="fail"/>
+ <failure tag="should FAIL: inf != 0" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 0" result="fail"/>
+ <failure tag="should FAIL: 0 != inf" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): inf" result="fail"/>
+ <failure tag="should FAIL: &#x002D;inf != 0" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : &#x002D;inf
+ Expected (operandRight): 0" result="fail"/>
+ <failure tag="should FAIL: 0 != &#x002D;inf" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): &#x002D;inf" result="fail"/>
+ <failure tag="should FAIL: inf != 1" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 1" result="fail"/>
+ <failure tag="should FAIL: 1 != inf" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): inf" result="fail"/>
+ <failure tag="should FAIL: &#x002D;inf != 1" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : &#x002D;inf
+ Expected (operandRight): 1" result="fail"/>
+ <failure tag="should FAIL: 1 != &#x002D;inf" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): &#x002D;inf" result="fail"/>
+ <failure tag="should FAIL: inf != max" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 1.79769313486e+308" result="fail"/>
+ <failure tag="should FAIL: inf != &#x002D;max" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): &#x002D;1.79769313486e+308" result="fail"/>
+ <failure tag="should FAIL: max != inf" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1.79769313486e+308
+ Expected (operandRight): inf" result="fail"/>
+ <failure tag="should FAIL: &#x002D;max != inf" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : &#x002D;1.79769313486e+308
+ Expected (operandRight): inf" result="fail"/>
+ <failure tag="should FAIL: &#x002D;inf != max" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : &#x002D;inf
+ Expected (operandRight): 1.79769313486e+308" result="fail"/>
+ <failure tag="should FAIL: &#x002D;inf != &#x002D;max" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : &#x002D;inf
+ Expected (operandRight): &#x002D;1.79769313486e+308" result="fail"/>
+ <failure tag="should FAIL: max != &#x002D;inf" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : 1.79769313486e+308
+ Expected (operandRight): &#x002D;inf" result="fail"/>
+ <failure tag="should FAIL: &#x002D;max != &#x002D;inf" message="Compared doubles are not the same (fuzzy compare)
+ Actual (operandLeft) : &#x002D;1.79769313486e+308
+ Expected (operandRight): &#x002D;inf" result="fail"/>
+ </testcase>
<testcase result="fail" name="floatComparisons">
<failure tag="should FAIL 1" message="Compared floats are not the same (fuzzy compare)
Actual (operandLeft) : 1
@@ -14,8 +109,92 @@
Actual (operandLeft) : 1e&#x002D;07
Expected (operandRight): 3e&#x002D;07" result="fail"/>
<failure tag="should FAIL 3" message="Compared floats are not the same (fuzzy compare)
- Actual (operandLeft) : 99998
- Expected (operandRight): 99999" result="fail"/>
+ Actual (operandLeft) : 99999
+ Expected (operandRight): 99998" result="fail"/>
+ <failure tag="should FAIL 4" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 9.9999e&#x002D;40
+ Expected (operandRight): 9.99971e&#x002D;40" result="fail"/>
+ <failure tag="should FAIL 5" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 9.9999e+37
+ Expected (operandRight): 9.9997e+37" result="fail"/>
+ <failure tag="should FAIL: NaN != 0" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): 0" result="fail"/>
+ <failure tag="should FAIL: 0 != NaN" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): nan" result="fail"/>
+ <failure tag="should FAIL: NaN != 1" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): 1" result="fail"/>
+ <failure tag="should FAIL: 1 != NaN" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): nan" result="fail"/>
+ <failure tag="should FAIL: inf != &#x002D;inf" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): &#x002D;inf" result="fail"/>
+ <failure tag="should FAIL: &#x002D;inf != inf" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : &#x002D;inf
+ Expected (operandRight): inf" result="fail"/>
+ <failure tag="should FAIL: inf != nan" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): nan" result="fail"/>
+ <failure tag="should FAIL: nan != inf" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): inf" result="fail"/>
+ <failure tag="should FAIL: &#x002D;inf != nan" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : &#x002D;inf
+ Expected (operandRight): nan" result="fail"/>
+ <failure tag="should FAIL: nan != &#x002D;inf" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : nan
+ Expected (operandRight): &#x002D;inf" result="fail"/>
+ <failure tag="should FAIL: inf != 0" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 0" result="fail"/>
+ <failure tag="should FAIL: 0 != inf" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): inf" result="fail"/>
+ <failure tag="should FAIL: &#x002D;inf != 0" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : &#x002D;inf
+ Expected (operandRight): 0" result="fail"/>
+ <failure tag="should FAIL: 0 != &#x002D;inf" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 0
+ Expected (operandRight): &#x002D;inf" result="fail"/>
+ <failure tag="should FAIL: inf != 1" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 1" result="fail"/>
+ <failure tag="should FAIL: 1 != inf" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): inf" result="fail"/>
+ <failure tag="should FAIL: &#x002D;inf != 1" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : &#x002D;inf
+ Expected (operandRight): 1" result="fail"/>
+ <failure tag="should FAIL: 1 != &#x002D;inf" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): &#x002D;inf" result="fail"/>
+ <failure tag="should FAIL: inf != max" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): 3.40282e+38" result="fail"/>
+ <failure tag="should FAIL: inf != &#x002D;max" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : inf
+ Expected (operandRight): &#x002D;3.40282e+38" result="fail"/>
+ <failure tag="should FAIL: max != inf" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 3.40282e+38
+ Expected (operandRight): inf" result="fail"/>
+ <failure tag="should FAIL: &#x002D;max != inf" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : &#x002D;3.40282e+38
+ Expected (operandRight): inf" result="fail"/>
+ <failure tag="should FAIL: &#x002D;inf != max" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : &#x002D;inf
+ Expected (operandRight): 3.40282e+38" result="fail"/>
+ <failure tag="should FAIL: &#x002D;inf != &#x002D;max" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : &#x002D;inf
+ Expected (operandRight): &#x002D;3.40282e+38" result="fail"/>
+ <failure tag="should FAIL: max != &#x002D;inf" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : 3.40282e+38
+ Expected (operandRight): &#x002D;inf" result="fail"/>
+ <failure tag="should FAIL: &#x002D;max != &#x002D;inf" message="Compared floats are not the same (fuzzy compare)
+ Actual (operandLeft) : &#x002D;3.40282e+38
+ Expected (operandRight): &#x002D;inf" result="fail"/>
</testcase>
<testcase result="fail" name="compareFloatTests">
<failure tag="1e0" message="Compared floats are not the same (fuzzy compare)
diff --git a/tests/auto/testlib/selftests/float/tst_float.cpp b/tests/auto/testlib/selftests/float/tst_float.cpp
index 2fffcc7803..babb588f4b 100644
--- a/tests/auto/testlib/selftests/float/tst_float.cpp
+++ b/tests/auto/testlib/selftests/float/tst_float.cpp
@@ -30,16 +30,92 @@
#include <QtTest/QtTest>
#include <QDebug>
+// Test proper handling of floating-point types
class tst_float: public QObject
{
Q_OBJECT
private slots:
+ void doubleComparisons() const;
+ void doubleComparisons_data() const;
void floatComparisons() const;
void floatComparisons_data() const;
void compareFloatTests() const;
void compareFloatTests_data() const;
};
+void tst_float::doubleComparisons() const
+{
+ QFETCH(double, operandLeft);
+ QFETCH(double, operandRight);
+
+ QCOMPARE(operandLeft, operandRight);
+}
+
+void tst_float::doubleComparisons_data() const
+{
+ QTest::addColumn<double>("operandLeft");
+ QTest::addColumn<double>("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<double>::has_quiet_NaN) {
+ const double nan = std::numeric_limits<double>::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<double>::has_infinity) {
+ const double uge = std::numeric_limits<double>::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<double>::has_quiet_NaN) {
+ const double nan = std::numeric_limits<double>::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<double>::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<float>("operandLeft");
QTest::addColumn<float>("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<float>::has_quiet_NaN) {
+ const float nan = std::numeric_limits<float>::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<float>::has_infinity) {
+ const float uge = std::numeric_limits<float>::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<float>::has_quiet_NaN) {
+ const float nan = std::numeric_limits<float>::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<float>::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(' '));