summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2009-06-02 19:02:42 (GMT)
committerLars Knoll <lars.knoll@nokia.com>2009-06-15 11:00:00 (GMT)
commitb615be69f06a97aff3694065e97541133647d877 (patch)
treedc90aa08d31b6bdde2d534394311d3543a9e9981 /tests
parent44766d265c16551043d2739171069fe042c40091 (diff)
downloadQt-b615be69f06a97aff3694065e97541133647d877.zip
Qt-b615be69f06a97aff3694065e97541133647d877.tar.gz
Qt-b615be69f06a97aff3694065e97541133647d877.tar.bz2
implement equality operator in a more sane way
Using qFuzzyCompare for checking whether two transformations are equal doesn't give us too much and is inconsistent with our other matrix classes. Using simple floating point equality is a lot faster as well. Added qFuzzyCompare overloads for QMatrix and QTransform to still allow for fuzzy comparisons. Reviewed-By: Samuel Rødal
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qtransform/tst_qtransform.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qtransform/tst_qtransform.cpp b/tests/auto/qtransform/tst_qtransform.cpp
index 3b13a41..99a449a 100644
--- a/tests/auto/qtransform/tst_qtransform.cpp
+++ b/tests/auto/qtransform/tst_qtransform.cpp
@@ -654,7 +654,7 @@ void tst_QTransform::transform()
d.rotate(30);
e.shear(0.5, 0.5);
- QCOMPARE(t, e * d * c * b * a);
+ QVERIFY(qFuzzyCompare(t, e * d * c * b * a));
}
void tst_QTransform::mapEmptyPath()