summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicstransform
diff options
context:
space:
mode:
authorninerider <qt-info@nokia.com>2009-10-08 12:05:54 (GMT)
committerninerider <qt-info@nokia.com>2009-10-08 12:05:54 (GMT)
commite1f7d33dcd8267fd2fc9658df6245ca30df3741e (patch)
tree5406d59038f474827ddb248fe55f618ca636b6e7 /tests/auto/qgraphicstransform
parent0c64fc77e95180171fc46d89d08bea3f2efc6bcc (diff)
downloadQt-e1f7d33dcd8267fd2fc9658df6245ca30df3741e.zip
Qt-e1f7d33dcd8267fd2fc9658df6245ca30df3741e.tar.gz
Qt-e1f7d33dcd8267fd2fc9658df6245ca30df3741e.tar.bz2
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 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)
{