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.lightxml | |
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.lightxml')
-rw-r--r-- | tests/auto/testlib/selftests/expected_float.lightxml | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/auto/testlib/selftests/expected_float.lightxml b/tests/auto/testlib/selftests/expected_float.lightxml index 5f5114bb2e..cf82929fd0 100644 --- a/tests/auto/testlib/selftests/expected_float.lightxml +++ b/tests/auto/testlib/selftests/expected_float.lightxml @@ -38,8 +38,8 @@ <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> <DataTag><![CDATA[should FAIL 4]]></DataTag> <Description><![CDATA[Compared doubles are not the same (fuzzy compare) - Actual (operandLeft) : 9.99999999999e-311 - Expected (operandRight): 9.99999999997e-311]]></Description> + Actual (operandLeft) : 1e-12 + Expected (operandRight): 9.99999999999e-13]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[should PASS 4]]></DataTag> @@ -230,8 +230,8 @@ <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> <DataTag><![CDATA[should FAIL 2]]></DataTag> <Description><![CDATA[Compared floats are not the same (fuzzy compare) - Actual (operandLeft) : 1e-07 - Expected (operandRight): 3e-07]]></Description> + Actual (operandLeft) : 1e-05 + Expected (operandRight): 3e-05]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[should PASS 2]]></DataTag> @@ -248,8 +248,8 @@ <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> <DataTag><![CDATA[should FAIL 4]]></DataTag> <Description><![CDATA[Compared floats are not the same (fuzzy compare) - Actual (operandLeft) : 9.9999e-40 - Expected (operandRight): 9.99971e-40]]></Description> + Actual (operandLeft) : 1.00001e-05 + Expected (operandRight): 9.9999e-06]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[should PASS 4]]></DataTag> @@ -440,8 +440,8 @@ <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> <DataTag><![CDATA[should FAIL 2]]></DataTag> <Description><![CDATA[Compared qfloat16s are not the same (fuzzy compare) - Actual (operandLeft) : 0.0001 - Expected (operandRight): 0.0003]]></Description> + Actual (operandLeft) : 0.000999 + Expected (operandRight): 0.003]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[should PASS 2]]></DataTag> @@ -458,8 +458,8 @@ <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> <DataTag><![CDATA[should FAIL 4]]></DataTag> <Description><![CDATA[Compared qfloat16s are not the same (fuzzy compare) - Actual (operandLeft) : 5.93e-05 - Expected (operandRight): 5.87e-05]]></Description> + Actual (operandLeft) : 0.00101 + Expected (operandRight): 0.00099]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[should PASS 4]]></DataTag> @@ -645,10 +645,10 @@ Expected (t3): 3]]></Description> </Incident> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> - <DataTag><![CDATA[1e-7]]></DataTag> + <DataTag><![CDATA[1e-5]]></DataTag> <Description><![CDATA[Compared floats are not the same (fuzzy compare) - Actual (t1): 1e-07 - Expected (t3): 3e-07]]></Description> + Actual (t1): 1e-05 + Expected (t3): 3e-05]]></Description> </Incident> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0"> <DataTag><![CDATA[1e+7]]></DataTag> |