Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_UI fails because 112,38 != 112,39 #1023

Open
jlaurens opened this issue May 12, 2023 · 1 comment
Open

test_UI fails because 112,38 != 112,39 #1023

jlaurens opened this issue May 12, 2023 · 1 comment
Assignees
Labels

Comments

@jlaurens
Copy link
Collaborator

Bug description:

On macOS Ventura 13.3.1(a) this test sometimes fails.
The first idea is to replace QCOMPARE with a less strict equality test.

I will post a pull request soon.

@jlaurens jlaurens added the bug label May 12, 2023
@jlaurens jlaurens self-assigned this May 12, 2023
@stloeffler
Copy link
Member

According to the Qt docs, "When comparing floating-point types (float, double, and qfloat16), qFuzzyCompare() is used for finite values." So there is no strict equality for floating point numbers anyway.
From a binary point of view, float (i.e. IEEE 754 binary32) has (slightly more than) 7 decimal digits of accuracy, so 112,28 is indeed significantly different from 112,39 from a numeric point of view (difference in the 5th digit). It would be helpful to know which particular test in test_UI actually fails, as I couldn't find either of the mentioned numbers as hard-coded values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants