summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpropertyanimation
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-10-20 12:53:04 +0200
committerThierry Bastian <thierry.bastian@nokia.com>2009-10-20 12:53:56 +0200
commit462b2eae2386d22709943187820ec3f071399682 (patch)
tree528c89fb27bde3684d577dd7f385859faf0f6e56 /tests/auto/qpropertyanimation
parent8b0e59706f0d7a68446b6ff5c646e2bbdef5f496 (diff)
adding autotests
Diffstat (limited to 'tests/auto/qpropertyanimation')
-rw-r--r--tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
index 51ef2dad1a..7dd17e532f 100644
--- a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
+++ b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
@@ -130,6 +130,7 @@ private slots:
void valueChanged();
void twoAnimations();
void deletedInUpdateCurrentTime();
+ void totalDuration();
};
tst_QPropertyAnimation::tst_QPropertyAnimation()
@@ -1199,5 +1200,18 @@ void tst_QPropertyAnimation::deletedInUpdateCurrentTime()
QCOMPARE(o.value(), 1000);
}
+void tst_QPropertyAnimation::totalDuration()
+{
+ QPropertyAnimation anim;
+ QCOMPARE(anim.totalDuration(), 250);
+ anim.setLoopCount(2);
+ QCOMPARE(anim.totalDuration(), 2*250);
+ anim.setLoopCount(-1);
+ QCOMPARE(anim.totalDuration(), -1);
+ anim.setDuration(0);
+ QCOMPARE(anim.totalDuration(), 0);
+}
+
+
QTEST_MAIN(tst_QPropertyAnimation)
#include "tst_qpropertyanimation.moc"