summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-03-15 14:20:23 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-03-15 14:20:23 (GMT)
commitef93b78f38d7f35f42bc896ad23263668ac9f2e7 (patch)
tree2c460390dfc10b0ae1f5f784d378a3f53ccd8d75 /tests/auto
parent45c31fee7deea7800a2ef86dad7d6966ee2ceafd (diff)
parentb3b332a50a6288164ca86d0691e9615f9c19abda (diff)
downloadQt-ef93b78f38d7f35f42bc896ad23263668ac9f2e7.zip
Qt-ef93b78f38d7f35f42bc896ad23263668ac9f2e7.tar.gz
Qt-ef93b78f38d7f35f42bc896ad23263668ac9f2e7.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: (46 commits) Fix the license info for bin/elf2e32_qtwrapper.pl. Avoid panics in QDesktopWidget on Symbian emulator. QS60Style: use placeholder texture when polishing widgets and palette Regression: QS60Style: Theme background is incorrect Remove changes from fix to QTBUG-17045 that were not related to the fix Prevent null pointer crash when closing splitview QS60Style slows down layout switch by updating widgets unnecessarily Fix qgraphicstransform autotest for Symbian, where qreal is float. Removed reference to nonexistant profile. Disable capabilities example for symbian-gcce due to a bug in elf2e32 Readded a ';;' that was removed by mistake. Fixed mkspec detection for Symbian. Removed javascript-jit from default symbian-gcce build. Corrected a mismerge in GCCE link parameters. Fixed incorrect referral to an include file. Fixed win32-msvc2008 build regression. Made qmake strip trailing \ from libdirs. Fixed GCCE libdir handling if the paths have spaces in them. Added MinGW support for adding lib prefix and extension via profile. Added support for various special compiler/linker flags on MinGW. ...
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
index 79f2213..9434a0b 100644
--- a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
+++ b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
@@ -163,10 +163,11 @@ static inline bool fuzzyCompare(qreal p1, qreal 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)));
+ return (qAbs(p1 - p2) <= 0.00003f * 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)
{
return fuzzyCompare(t1.m11(), t2.m11()) &&
@@ -180,6 +181,15 @@ static bool fuzzyCompare(const QTransform& t1, const QTransform& t2)
fuzzyCompare(t1.m33(), t2.m33());
}
+static inline bool fuzzyCompare(const QMatrix4x4& m1, const QMatrix4x4& m2)
+{
+ bool ok = true;
+ for (int y = 0; y < 4; ++y)
+ for (int x = 0; x < 4; ++x)
+ ok &= fuzzyCompare(m1(y, x), m2(y, x));
+ return ok;
+}
+
void tst_QGraphicsTransform::rotation()
{
QGraphicsRotation rotation;
@@ -267,7 +277,7 @@ void tst_QGraphicsTransform::rotation3d()
// because the deg2rad value in QTransform is not accurate
// enough to match what QMatrix4x4 is doing.
} else {
- QVERIFY(qFuzzyCompare(t, r));
+ QVERIFY(fuzzyCompare(t, r));
}
//now let's check that a null vector will not change the transform