From 0316506d9ddbc3ca9f26f880b9e7fb5d5b0fec36 Mon Sep 17 00:00:00 2001 From: Rafael Roquetto Date: Tue, 30 Jul 2013 17:07:48 -0300 Subject: Fix tst_qquickpath not to use fuzzy compare On arm platforms, qreal == float. QPointF stores its coordinates internally on qreal variables (float on arm). When QPointF comparison takes place, a call to qFuzzyIsNull(float) will ultimately be triggered, causing the test to fail for some values, because the epsilon of 0.00001f is too small. In the particular case regarding BB10, the comparison between QPointF(100, 150) and QPointF(99.9999771, 150) is failing because of that. Change-Id: I53c8cfe7f8a975f6a015e7690702d3e5f05bc2f2 Reviewed-by: Frederik Gladhorn --- tests/auto/quick/qquickpath/tst_qquickpath.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/quick/qquickpath/tst_qquickpath.cpp') diff --git a/tests/auto/quick/qquickpath/tst_qquickpath.cpp b/tests/auto/quick/qquickpath/tst_qquickpath.cpp index fa68442329..6ecc5cee50 100644 --- a/tests/auto/quick/qquickpath/tst_qquickpath.cpp +++ b/tests/auto/quick/qquickpath/tst_qquickpath.cpp @@ -128,7 +128,7 @@ void tst_QuickPath::catmullromCurve() pos = obj->pointAt(.75); QCOMPARE(pos.toPoint(), QPoint(51,105)); //fuzzy compare pos = obj->pointAt(1); - QCOMPARE(pos, QPointF(100,150)); + QCOMPARE(pos.toPoint(), QPoint(100,150)); } void tst_QuickPath::closedCatmullromCurve() @@ -227,7 +227,7 @@ void tst_QuickPath::line() QCOMPARE(p1.x(), p1.y()); QPointF p2 = path2->pointAt(t); - QCOMPARE(p1, p2); + QCOMPARE(p1.toPoint(), p2.toPoint()); } } -- cgit v1.2.3