summaryrefslogtreecommitdiffstats
path: root/tests/auto/qchart/tst_qchart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qchart/tst_qchart.cpp')
-rw-r--r--tests/auto/qchart/tst_qchart.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/auto/qchart/tst_qchart.cpp b/tests/auto/qchart/tst_qchart.cpp
index e0c5a49a..1e502d5a 100644
--- a/tests/auto/qchart/tst_qchart.cpp
+++ b/tests/auto/qchart/tst_qchart.cpp
@@ -59,6 +59,9 @@ private slots:
void addSeries();
void animationOptions_data();
void animationOptions();
+ void animationDuration();
+ void animationCurve_data();
+ void animationCurve();
void axisX_data();
void axisX();
void axisY_data();
@@ -160,6 +163,8 @@ void tst_QChart::qchart()
QVERIFY(m_chart->legend()->isVisible());
QCOMPARE(m_chart->animationOptions(), QChart::NoAnimation);
+ QCOMPARE(m_chart->animationDuration(), 1000);
+ QCOMPARE(m_chart->animationEasingCurve(), QEasingCurve(QEasingCurve::OutQuart));
QVERIFY(!m_chart->axisX());
QVERIFY(!m_chart->axisY());
QVERIFY(m_chart->backgroundBrush()!=QBrush());
@@ -258,6 +263,30 @@ void tst_QChart::animationOptions()
QCOMPARE(m_chart->animationOptions(), animationOptions);
}
+void tst_QChart::animationDuration()
+{
+ createTestData();
+ m_chart->setAnimationDuration(2000);
+ QVERIFY(m_chart->animationDuration() == 2000);
+}
+
+void tst_QChart::animationCurve_data()
+{
+ QTest::addColumn<QEasingCurve>("animationCurve");
+ QTest::newRow("Linear") << QEasingCurve(QEasingCurve::Linear);
+ QTest::newRow("InCubic") << QEasingCurve(QEasingCurve::InCubic);
+ QTest::newRow("OutSine") << QEasingCurve(QEasingCurve::OutSine);
+ QTest::newRow("OutInBack") << QEasingCurve(QEasingCurve::OutInBack);
+}
+
+void tst_QChart::animationCurve()
+{
+ createTestData();
+ QFETCH(QEasingCurve, animationCurve);
+ m_chart->setAnimationEasingCurve(animationCurve);
+ QCOMPARE(m_chart->animationEasingCurve(), animationCurve);
+}
+
void tst_QChart::axisX_data()
{