diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2020-07-14 14:18:29 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2020-07-14 15:34:25 +0200 |
commit | 4b61d6f52b166ca2b4a2e38a2fc60d631372f6a7 (patch) | |
tree | 0cbd6ca5d93deb732a17282f9c4bbeceb9676b36 /src/imports | |
parent | 04901b170e009d844232067446fdd56f270d155d (diff) |
Fix tst_QQuickMenu::subMenuPosition()
We're still getting failures after QCOMPARE was fixed
(in c78a960198d59fb9a9ddd83ad7098b1db396edfd):
FAIL! : tst_QQuickMenu::Material::subMenuPosition(cascading,flip) Compared doubles are not the same (fuzzy compare)
Actual (subSubMenu1->popupItem()->x()) : 3.88240550819e-11
Expected (subMenu1->popupItem()->x() - subSubMenu1->width() + overlap): 0
tst_qquickmenu.cpp(1532) : failure location
Quoting Eddy:
"[...] the threshold for double equality is one part in 1e12; the
threshold for fuzzy-is-zero is likewise 1e-12; so 3e-11 is non-zero.
One work-around, of course, would be to cast float(each operand) so as
to get float's wider tolerance (one part in 100,000, null if less than
1e-5)."
So that's what we do in this patch.
Change-Id: Iecf1b6f4b2cf2c81eb652bb0f565ac682b024dae
Pick-to: 5.15
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/imports')
0 files changed, 0 insertions, 0 deletions