summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicstransform
diff options
context:
space:
mode:
authorninerider <qt-info@nokia.com>2009-10-08 14:05:54 +0200
committerninerider <qt-info@nokia.com>2009-10-08 14:05:54 +0200
commite1f7d33dcd8267fd2fc9658df6245ca30df3741e (patch)
tree5406d59038f474827ddb248fe55f618ca636b6e7 /tests/auto/qgraphicstransform
parent0c64fc77e95180171fc46d89d08bea3f2efc6bcc (diff)
Comparison tolerance increased for handhelds
The 'fuzzy' value for the was not relaxed enoough for small devices such as Windows Mobile and the like. Reviewed-by: Joerg
Diffstat (limited to 'tests/auto/qgraphicstransform')
-rw-r--r--tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
index e8979eaa4e..b407fef2a2 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)
{