diff options
Diffstat (limited to 'tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp')
-rw-r--r-- | tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp index 51ef2da..7dd17e5 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" |