summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp')
-rw-r--r--tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp
index d1152419c0..c1d6184072 100644
--- a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp
+++ b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp
@@ -51,6 +51,7 @@ private slots:
void operators();
void properties();
void metaTypes();
+ void propertyOrderIsNotImportant();
void bezierSpline_data();
void bezierSpline();
void tcbSpline_data();
@@ -552,6 +553,25 @@ void tst_QEasingCurve::metaTypes()
QVERIFY(qMetaTypeId<QEasingCurve>() == QMetaType::QEasingCurve);
}
+/*
+ Test to ensure that regardless of what order properties are set, they should produce the same
+ behavior.
+ */
+void tst_QEasingCurve::propertyOrderIsNotImportant()
+{
+
+ QEasingCurve c1;
+ c1.setPeriod(1);
+ c1.setType(QEasingCurve::OutSine);
+ QVERIFY(c1.valueForProgress(0.75) > 0.9);
+
+ QEasingCurve c2;
+ c2.setType(QEasingCurve::OutSine);
+ c2.setPeriod(1);
+
+ QCOMPARE(c1.valueForProgress(0.75), c2.valueForProgress(0.75));
+}
+
void tst_QEasingCurve::bezierSpline_data()
{
QTest::addColumn<QString>("definition");