diff options
-rw-r--r-- | src/testlib/qtestcase.cpp | 55 | ||||
-rw-r--r-- | tests/auto/testlib/selftests/expected_float.lightxml | 403 | ||||
-rw-r--r-- | tests/auto/testlib/selftests/expected_float.tap | 778 | ||||
-rw-r--r-- | tests/auto/testlib/selftests/expected_float.teamcity | 211 | ||||
-rw-r--r-- | tests/auto/testlib/selftests/expected_float.txt | 258 | ||||
-rw-r--r-- | tests/auto/testlib/selftests/expected_float.xml | 403 | ||||
-rw-r--r-- | tests/auto/testlib/selftests/expected_float.xunitxml | 185 | ||||
-rw-r--r-- | tests/auto/testlib/selftests/float/tst_float.cpp | 150 | ||||
-rw-r--r-- | tests/auto/testlib/selftests/tst_selftests.cpp | 9 | ||||
-rw-r--r-- | tests/benchmarks/benchmarks.pro | 5 | ||||
-rw-r--r-- | tests/benchmarks/testlib/testlib.pro | 3 | ||||
-rw-r--r-- | tests/benchmarks/testlib/tostring/tostring.pro | 4 | ||||
-rw-r--r-- | tests/benchmarks/testlib/tostring/tst_tostring.cpp | 103 |
13 files changed, 2481 insertions, 86 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 2b0ad52b2d..22e8ac49bc 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -2525,7 +2525,7 @@ bool QTest::qCompare(double const &t1, double const &t2, const char *actual, con */ #define TO_STRING_IMPL(TYPE, FORMAT) \ -template <> Q_TESTLIB_EXPORT char *QTest::toString<TYPE >(const TYPE &t) \ +template <> Q_TESTLIB_EXPORT char *QTest::toString<TYPE>(const TYPE &t) \ { \ char *msg = new char[128]; \ qsnprintf(msg, 128, #FORMAT, t); \ @@ -2548,8 +2548,57 @@ TO_STRING_IMPL(quint64, %llu) TO_STRING_IMPL(bool, %d) TO_STRING_IMPL(signed char, %hhd) TO_STRING_IMPL(unsigned char, %hhu) -TO_STRING_IMPL(float, %g) -TO_STRING_IMPL(double, %lg) + +/*! + \internal + + Be consistent about leading 0 in exponent. + + POSIX specifies that %e (hence %g when using it) uses at least two digits in + the exponent, requiring a leading 0 on single-digit exponents; (at least) + MinGW includes a leading zero also on an already-two-digit exponent, + e.g. 9e-040, which differs from more usual platforms. So massage that away. + */ +static void massageExponent(char *text) +{ + char *p = strchr(text, 'e'); + if (!p) + return; + const char *const end = p + strlen(p); // *end is '\0' + p += (p[1] == '-' || p[1] == '+') ? 2 : 1; + if (p[0] != '0' || end - 2 <= p) + return; + // We have a leading 0 on an exponent of at least two more digits + const char *n = p + 1; + while (end - 2 > n && n[0] == '0') + ++n; + memmove(p, n, end + 1 - n); +} + +// Be consistent about display of infinities and NaNs (snprintf()'s varies, +// notably on MinGW, despite POSIX documenting "[-]inf" or "[-]infinity" for %f, +// %e and %g, uppercasing for their capital versions; similar for "nan"): +#define TO_STRING_FLOAT(TYPE, FORMAT) \ +template <> Q_TESTLIB_EXPORT char *QTest::toString<TYPE>(const TYPE &t) \ +{ \ + char *msg = new char[128]; \ + switch (std::fpclassify(t)) { \ + case FP_INFINITE: \ + qstrncpy(msg, (t < 0 ? "-inf" : "inf"), 128); \ + break; \ + case FP_NAN: \ + qstrncpy(msg, "nan", 128); \ + break; \ + default: \ + qsnprintf(msg, 128, #FORMAT, t); \ + massageExponent(msg); \ + break; \ + } \ + return msg; \ +} + +TO_STRING_FLOAT(float, %g) +TO_STRING_FLOAT(double, %.12lg) template <> Q_TESTLIB_EXPORT char *QTest::toString<char>(const char &t) { 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-07 + Expected (operandRight): 3e-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-311 + Expected (operandRight): 9.99999999997e-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 != -inf" message="Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : inf + Expected (operandRight): -inf" result="fail"/> + <failure tag="should FAIL: -inf != inf" message="Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : -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: -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: 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: -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: 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: -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: 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 != -max" message="Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : inf + Expected (operandRight): -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: -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: -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 != -max" message="Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : -inf + Expected (operandRight): -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: -max != -inf" message="Compared doubles are not the same (fuzzy compare) + Actual (operandLeft) : -1.79769313486e+308 + Expected (operandRight): -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-07 Expected (operandRight): 3e-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-40 + Expected (operandRight): 9.99971e-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 != -inf" message="Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : inf + Expected (operandRight): -inf" result="fail"/> + <failure tag="should FAIL: -inf != inf" message="Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : -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: -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: 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: -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: 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: -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: 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 != -max" message="Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : inf + Expected (operandRight): -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: -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: -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 != -max" message="Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : -inf + Expected (operandRight): -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: -max != -inf" message="Compared floats are not the same (fuzzy compare) + Actual (operandLeft) : -3.40282e+38 + Expected (operandRight): -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(' ')); diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro index 9e288f7aa2..a98b9a62c6 100644 --- a/tests/benchmarks/benchmarks.pro +++ b/tests/benchmarks/benchmarks.pro @@ -3,10 +3,11 @@ SUBDIRS = \ corelib \ sql \ -# removed-by-refactor qtHaveModule(opengl): SUBDIRS += opengl qtHaveModule(dbus): SUBDIRS += dbus -qtHaveModule(network): SUBDIRS += network qtHaveModule(gui): SUBDIRS += gui +qtHaveModule(network): SUBDIRS += network +# removed-by-refactor qtHaveModule(opengl): SUBDIRS += opengl +qtHaveModule(testlib): SUBDIRS += testlib qtHaveModule(widgets): SUBDIRS += widgets check-trusted.CONFIG += recursive diff --git a/tests/benchmarks/testlib/testlib.pro b/tests/benchmarks/testlib/testlib.pro new file mode 100644 index 0000000000..c325f3de9a --- /dev/null +++ b/tests/benchmarks/testlib/testlib.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs +SUBDIRS = \ + tostring \ diff --git a/tests/benchmarks/testlib/tostring/tostring.pro b/tests/benchmarks/testlib/tostring/tostring.pro new file mode 100644 index 0000000000..a5aebe1c81 --- /dev/null +++ b/tests/benchmarks/testlib/tostring/tostring.pro @@ -0,0 +1,4 @@ +TARGET = tst_bench_tostring +QT = core testlib + +SOURCES += tst_tostring.cpp diff --git a/tests/benchmarks/testlib/tostring/tst_tostring.cpp b/tests/benchmarks/testlib/tostring/tst_tostring.cpp new file mode 100644 index 0000000000..1731929f98 --- /dev/null +++ b/tests/benchmarks/testlib/tostring/tst_tostring.cpp @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** Copyright (C) 2019 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtTest/QtTest> +#include <QtCore/qmath.h> // pi, e + +// Tests for QTest::toString +class tst_toString : public QObject +{ + Q_OBJECT + + template <typename T> void numeric_data(); + template <typename T> void numeric(); + +private slots: + void floatTst_data() { numeric_data<float>(); } + void floatTst() { numeric<float>(); } + void doubleTst_data() { numeric_data<double>(); } + void doubleTst() { numeric<double>(); } + void intTst_data() { numeric_data<int>(); } + void intTst() { numeric<int>(); } + void unsignedTst_data() { numeric_data<unsigned>(); } + void unsignedTst() { numeric<unsigned>(); } + void quint64Tst_data() { numeric_data<quint64>(); } + void quint64Tst() { numeric<quint64>(); } + void qint64Tst_data() { numeric_data<qint64>(); } + void qint64Tst() { numeric<qint64>(); } +}; + +template <typename T> +void tst_toString::numeric_data() +{ + QTest::addColumn<T>("datum"); + const bool floaty = std::is_floating_point<T>::value; + + QTest::newRow("zero") << T(0); + QTest::newRow("one") << T(1); + if (floaty) { + QTest::newRow("pi") << T(M_PI); + QTest::newRow("e") << T(M_E); + + // Stress canonicalisation of leading zeros on exponents: + QTest::newRow("milli") << T(1e-3); + QTest::newRow("micro") << T(1e-6); + QTest::newRow("mu0") << T(.4e-6 * M_PI); // Henry/metre + QTest::newRow("Planck") << T(662.606876e-36); // Joule.second/turn + } + QTest::newRow("2e9") << T(2000000000); + QTest::newRow("c.s/m") << T(299792458); + QTest::newRow("Avogadro") << T(6.022045e+23); // things/mol (.996 << 79, so ints overflow to max) + + QTest::newRow("lowest") << std::numeric_limits<T>::lowest(); + QTest::newRow("max") << std::numeric_limits<T>::max(); + if (floaty) { + QTest::newRow("min") << std::numeric_limits<T>::min(); + + if (std::numeric_limits<T>::has_infinity) { + const T uge = std::numeric_limits<T>::infinity(); + QTest::newRow("inf") << uge; + QTest::newRow("-inf") << -uge; + } + if (std::numeric_limits<T>::has_quiet_NaN) + QTest::newRow("nan") << std::numeric_limits<T>::quiet_NaN(); + } +} + +template <typename T> +void tst_toString::numeric() +{ + QFETCH(T, datum); + + QBENCHMARK { + QTest::toString<T>(datum); + } +} + +QTEST_MAIN(tst_toString) +#include "tst_tostring.moc" |