diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-14 17:46:16 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-14 17:46:34 +0200 |
commit | 440286655e0ca271506cf7cc02ad0dbf4baef9ca (patch) | |
tree | 896fa81adb8b14a69355a3a6cf64d06ec8173c9a /tests/auto/corelib/tools/qeasingcurve | |
parent | 1e27ad1697187549151657ba187928e439300db7 (diff) | |
parent | e164d61ca8263fc4b46fdd916e1ea77c7dd2b735 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
Diffstat (limited to 'tests/auto/corelib/tools/qeasingcurve')
-rw-r--r-- | tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp index 3af6132695..2a9c1e1e41 100644 --- a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp +++ b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp @@ -404,6 +404,11 @@ void tst_QEasingCurve::valueForProgress() const qreal error = qAbs(ex - curve.valueForProgress(at.at(i)/qreal(100))); QVERIFY(error <= errorBound); } + + if (type != QEasingCurve::SineCurve && type != QEasingCurve::CosineCurve) { + QVERIFY( !(curve.valueForProgress(0) > 0) ); + QVERIFY( !(curve.valueForProgress(1) < 1) ); + } #endif } @@ -632,6 +637,9 @@ void tst_QEasingCurve::bezierSpline() QCOMPARE(value, ex); QVERIFY(error <= errorBound); } + + QVERIFY( !(bezierEasingCurve.valueForProgress(0) > 0) ); + QVERIFY( !(bezierEasingCurve.valueForProgress(1) < 1) ); } void tst_QEasingCurve::tcbSpline_data() @@ -691,6 +699,9 @@ void tst_QEasingCurve::tcbSpline() QCOMPARE(value, ex); QVERIFY(error <= errorBound); } + + QVERIFY( !(tcbEasingCurve.valueForProgress(0) > 0) ); + QVERIFY( !(tcbEasingCurve.valueForProgress(1) < 1) ); } /*This is single precision code for a cubic root used inside the spline easing curve. |