diff options
Diffstat (limited to 'tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp')
-rw-r--r-- | tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp index e8979ea..b407fef 100644 --- a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp +++ b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp @@ -159,7 +159,11 @@ void tst_QGraphicsTransform::scale() // definitions correct for the difference. static inline bool fuzzyCompare(qreal p1, qreal p2) { - return (qAbs(p1 - p2) <= 0.00001f * qMin(qAbs(p1), qAbs(p2))); + // increase delta on small machines using float instead of double + if (sizeof(qreal) == sizeof(float)) + return (qAbs(p1 - p2) <= 0.00002f * qMin(qAbs(p1), qAbs(p2))); + else + return (qAbs(p1 - p2) <= 0.00001f * qMin(qAbs(p1), qAbs(p2))); } static bool fuzzyCompare(const QTransform& t1, const QTransform& t2) { |