diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-09-09 04:49:28 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-09-09 04:49:28 (GMT) |
commit | a9dc52d88fd40f55acfcbb64131291dea18d8ccc (patch) | |
tree | ed13ac3349058aecc50266face61fa27e693a760 /tests | |
parent | 99233e3ed58120859f97e0ce1940523d188f85af (diff) | |
parent | d4386c1c3250466741b66c290e5d7509223705be (diff) | |
download | Qt-a9dc52d88fd40f55acfcbb64131291dea18d8ccc.zip Qt-a9dc52d88fd40f55acfcbb64131291dea18d8ccc.tar.gz Qt-a9dc52d88fd40f55acfcbb64131291dea18d8ccc.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.cpp | 21 | ||||
-rw-r--r-- | tests/auto/qimage/tst_qimage.cpp | 4 |
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 ); |