diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-12-20 10:53:28 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-12-20 10:33:53 +0000 |
commit | aaedef9fec97329b7ca5568670de571f5b8e8df8 (patch) | |
tree | 7e45acb0a7af427937b6ce56a10662399268f96c /tests | |
parent | b7216da727e4d2c135601afdf561ffcd2460af4e (diff) |
Attempt to stabilize tst_tumbler::test_itemsCorrectlyPositioned()
Since 8e4b910, we've been often seeing the following failure in CI:
FAIL! : tst_controls::Default::Tumbler::test_itemsCorrectlyPositioned() Compared values are not the same
Actual (): 0.00008000000001118224
Expected (): 0
Loc: [/Users/qt/work/qt/qtquickcontrols2/tests/auto/controls/data/tst_tumbler.qml(352)]
QQuickPathView uses such tiny 0.00001 offsets internally. => Use fuzzy
compare for the expected position.
Change-Id: Ie6c1025003aa57335232d23fb8466d1578dc1ab3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/controls/data/tst_tumbler.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/controls/data/tst_tumbler.qml b/tests/auto/controls/data/tst_tumbler.qml index aaf888c2..825c2489 100644 --- a/tests/auto/controls/data/tst_tumbler.qml +++ b/tests/auto/controls/data/tst_tumbler.qml @@ -348,8 +348,8 @@ TestCase { verify(firstItem); // Test QTBUG-40298. actualPos = testCase.mapFromItem(firstItem, 0, 0); - compare(actualPos.x, tumbler.leftPadding); - compare(actualPos.y, tumbler.topPadding); + fuzzyCompare(actualPos.x, tumbler.leftPadding, 0.0001); + fuzzyCompare(actualPos.y, tumbler.topPadding, 0.0001); var secondItemCenterPos = itemCenterPos(1); var secondItem = tumblerView.itemAt(secondItemCenterPos.x, secondItemCenterPos.y); |