diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-04-15 13:10:31 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-04-30 13:44:08 +0200 |
commit | c78a960198d59fb9a9ddd83ad7098b1db396edfd (patch) | |
tree | 3e8eec0b57cd67796743ebb56fa883ca24ee2f69 /tests/auto/testlib/selftests/expected_float.junitxml | |
parent | 91d18c646443c812addf6d1cdada99d3c2d3a3ec (diff) |
QCOMPARE: treat values as equal if qFuzzyIsNull(each)
We hope this shall avoid some flaky failures noticed in quick tests,
e.g. tst_QQuickMenu::Material::subMenuPosition(cascading,flip) was
recently seen failing with 3.88e-11 != 0. This required some revision
to test data in the testlib selftest for floats; the resulting
expected output differs in details but not in which tests pass or
fail. QEMU, naturally, made life difficult, requiring special-case
code in the test-driver.
[ChangeLog][QtTestLib][QCOMPARE] QCOMPARE() now treats its values as
equal when qFuzzyIsNull() is true for both of them.
Change-Id: Icc6ad5164b609937eddbe39cc69120f0abf0f3b4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/testlib/selftests/expected_float.junitxml')
-rw-r--r-- | tests/auto/testlib/selftests/expected_float.junitxml | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/auto/testlib/selftests/expected_float.junitxml b/tests/auto/testlib/selftests/expected_float.junitxml index 602f9252a4..51a711efb7 100644 --- a/tests/auto/testlib/selftests/expected_float.junitxml +++ b/tests/auto/testlib/selftests/expected_float.junitxml @@ -17,8 +17,8 @@ Actual (operandLeft) : 999999999999 Expected (operandRight): 999999999998" result="fail"/> <failure tag="should FAIL 4" message="Compared doubles are not the same (fuzzy compare) - Actual (operandLeft) : 9.99999999999e-311 - Expected (operandRight): 9.99999999997e-311" result="fail"/> + Actual (operandLeft) : 1e-12 + Expected (operandRight): 9.99999999999e-13" result="fail"/> <failure tag="should FAIL 5" message="Compared doubles are not the same (fuzzy compare) Actual (operandLeft) : 9.99999999999e+306 Expected (operandRight): 9.99999999997e+306" result="fail"/> @@ -106,14 +106,14 @@ Actual (operandLeft) : 1 Expected (operandRight): 3" result="fail"/> <failure tag="should FAIL 2" message="Compared floats are not the same (fuzzy compare) - Actual (operandLeft) : 1e-07 - Expected (operandRight): 3e-07" result="fail"/> + Actual (operandLeft) : 1e-05 + Expected (operandRight): 3e-05" result="fail"/> <failure tag="should FAIL 3" message="Compared floats are not the same (fuzzy compare) Actual (operandLeft) : 99999 Expected (operandRight): 99998" result="fail"/> <failure tag="should FAIL 4" message="Compared floats are not the same (fuzzy compare) - Actual (operandLeft) : 9.9999e-40 - Expected (operandRight): 9.99971e-40" result="fail"/> + Actual (operandLeft) : 1.00001e-05 + Expected (operandRight): 9.9999e-06" result="fail"/> <failure tag="should FAIL 5" message="Compared floats are not the same (fuzzy compare) Actual (operandLeft) : 9.9999e+37 Expected (operandRight): 9.9997e+37" result="fail"/> @@ -201,14 +201,14 @@ Actual (operandLeft) : 1 Expected (operandRight): 3" result="fail"/> <failure tag="should FAIL 2" message="Compared qfloat16s are not the same (fuzzy compare) - Actual (operandLeft) : 0.0001 - Expected (operandRight): 0.0003" result="fail"/> + Actual (operandLeft) : 0.000999 + Expected (operandRight): 0.003" result="fail"/> <failure tag="should FAIL 3" message="Compared qfloat16s are not the same (fuzzy compare) Actual (operandLeft) : 98 Expected (operandRight): 99" result="fail"/> <failure tag="should FAIL 4" message="Compared qfloat16s are not the same (fuzzy compare) - Actual (operandLeft) : 5.93e-05 - Expected (operandRight): 5.87e-05" result="fail"/> + Actual (operandLeft) : 0.00101 + Expected (operandRight): 0.00099" result="fail"/> <failure tag="should FAIL 5" message="Compared qfloat16s are not the same (fuzzy compare) Actual (operandLeft) : 5.94e+04 Expected (operandRight): 5.88e+04" result="fail"/> @@ -295,9 +295,9 @@ <failure tag="1e0" message="Compared floats are not the same (fuzzy compare) Actual (t1): 1 Expected (t3): 3" result="fail"/> - <failure tag="1e-7" message="Compared floats are not the same (fuzzy compare) - Actual (t1): 1e-07 - Expected (t3): 3e-07" result="fail"/> + <failure tag="1e-5" message="Compared floats are not the same (fuzzy compare) + Actual (t1): 1e-05 + Expected (t3): 3e-05" result="fail"/> <failure tag="1e+7" message="Compared floats are not the same (fuzzy compare) Actual (t1): 1e+07 Expected (t3): 3e+07" result="fail"/> |