summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-09-08 17:14:16 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-09-08 17:14:16 (GMT)
commitd4386c1c3250466741b66c290e5d7509223705be (patch)
tree580d642e10b003f5bb38dc199467ed7e115cc1be /tests
parent526705430be6371166464689e970752a5ce41ed6 (diff)
parentf05b4bf65c86bc9ba22f6504f4109d2b49dfd627 (diff)
downloadQt-d4386c1c3250466741b66c290e5d7509223705be.zip
Qt-d4386c1c3250466741b66c290e5d7509223705be.tar.gz
Qt-d4386c1c3250466741b66c290e5d7509223705be.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix tst_qimage with QT_NO_EXCEPTIONS qdrawhelper: Optimisations in fetchTransformedBilinear qdrawhelper: use SSE2 for interpolation in fetchTransformedBilinear qdrawhelper: small optimisations in fetchTransformBilinear QEasingCurve::operator== returning wrong value
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qeasingcurve/tst_qeasingcurve.cpp21
-rw-r--r--tests/auto/qimage/tst_qimage.cpp4
2 files changed, 17 insertions, 8 deletions
diff --git a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp
index 124f900..2411ab6 100644
--- a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp
+++ b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp
@@ -153,19 +153,19 @@ void tst_QEasingCurve::propertyDefaults()
QEasingCurve curve(QEasingCurve::InElastic);
QCOMPARE(curve.period(), 0.3);
QCOMPARE(curve.amplitude(), 1.0);
- QCOMPARE(curve.overshoot(), qreal(1.70158f));
+ QCOMPARE(curve.overshoot(), qreal(1.70158));
curve.setType(QEasingCurve::InBounce);
QCOMPARE(curve.period(), 0.3);
QCOMPARE(curve.amplitude(), 1.0);
- QCOMPARE(curve.overshoot(), qreal(1.70158f));
+ QCOMPARE(curve.overshoot(), qreal(1.70158));
curve.setType(QEasingCurve::Linear);
QCOMPARE(curve.period(), 0.3);
QCOMPARE(curve.amplitude(), 1.0);
- QCOMPARE(curve.overshoot(), qreal(1.70158f));
+ QCOMPARE(curve.overshoot(), qreal(1.70158));
curve.setType(QEasingCurve::InElastic);
QCOMPARE(curve.period(), 0.3);
QCOMPARE(curve.amplitude(), 1.0);
- QCOMPARE(curve.overshoot(), qreal(1.70158f));
+ QCOMPARE(curve.overshoot(), qreal(1.70158));
curve.setPeriod(0.4);
curve.setAmplitude(0.6);
curve.setOvershoot(1.0);
@@ -490,7 +490,7 @@ void tst_QEasingCurve::operators()
// operator==
curve.setType(QEasingCurve::InBack);
curve2 = curve;
- curve2.setOvershoot(qreal(1.70158f));
+ curve2.setOvershoot(qreal(1.70158));
QCOMPARE(curve.overshoot(), curve2.overshoot());
QVERIFY(curve2 == curve);
@@ -505,6 +505,15 @@ void tst_QEasingCurve::operators()
curve2.setType(QEasingCurve::InBack);
QCOMPARE(curve.overshoot(), curve2.overshoot());
QVERIFY(curve2 == curve);
+
+ QEasingCurve curve3;
+ QEasingCurve curve4;
+ curve4.setAmplitude(curve4.amplitude());
+ QEasingCurve curve5;
+ curve5.setAmplitude(0.12345);
+ QVERIFY(curve3 == curve4); // default value and not assigned
+ QVERIFY(curve3 != curve5); // unassinged and other value
+ QVERIFY(curve4 != curve5);
}
class tst_QEasingProperties : public QObject
@@ -527,7 +536,7 @@ void tst_QEasingCurve::properties()
tst_QEasingProperties obj;
QEasingCurve inOutBack(QEasingCurve::InOutBack);
- qreal overshoot = 1.5f;
+ qreal overshoot = 1.5;
inOutBack.setOvershoot(overshoot);
qreal amplitude = inOutBack.amplitude();
qreal period = inOutBack.period();
diff --git a/tests/auto/qimage/tst_qimage.cpp b/tests/auto/qimage/tst_qimage.cpp
index ec0ecec..b446941 100644
--- a/tests/auto/qimage/tst_qimage.cpp
+++ b/tests/auto/qimage/tst_qimage.cpp
@@ -156,14 +156,14 @@ void tst_QImage::create()
{
bool cr = true;
#if !defined(Q_WS_QWS) && !defined(Q_OS_WINCE)
- try {
+ QT_TRY {
#endif
//QImage image(7000000, 7000000, 8, 256, QImage::IgnoreEndian);
QImage image(7000000, 7000000, QImage::Format_Indexed8);
image.setColorCount(256);
cr = !image.isNull();
#if !defined(Q_WS_QWS) && !defined(Q_OS_WINCE)
- } catch (...) {
+ } QT_CATCH (...) {
}
#endif
QVERIFY( !cr );