diff options
author | Martin Smith <msmith@trolltech.com> | 2010-05-14 12:51:23 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2010-05-14 12:51:23 (GMT) |
commit | a20119748ebf402dc5e91f57ac353939aa011458 (patch) | |
tree | cfb338c9f2119cc137cbcc9b7807604c7f7aba4e /tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp | |
parent | 02bc8c45f2cae1b6cd417631be8e98bc79c9c42d (diff) | |
parent | 47f894350cc48a6fdc4b5cc4c47c4c7f072678f9 (diff) | |
download | Qt-a20119748ebf402dc5e91f57ac353939aa011458.zip Qt-a20119748ebf402dc5e91f57ac353939aa011458.tar.gz Qt-a20119748ebf402dc5e91f57ac353939aa011458.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp')
-rw-r--r-- | tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp index 849b8b2..ea527de 100644 --- a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp +++ b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp @@ -133,6 +133,7 @@ private slots: void twoAnimations(); void deletedInUpdateCurrentTime(); void totalDuration(); + void zeroLoopCount(); }; tst_QPropertyAnimation::tst_QPropertyAnimation() @@ -1214,6 +1215,29 @@ void tst_QPropertyAnimation::totalDuration() QCOMPARE(anim.totalDuration(), 0); } +void tst_QPropertyAnimation::zeroLoopCount() +{ + DummyPropertyAnimation* anim; + anim = new DummyPropertyAnimation; + anim->setStartValue(0); + anim->setDuration(20); + anim->setLoopCount(0); + + QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy finishedSpy(anim, SIGNAL(finished())); + + QCOMPARE(anim->state(), QAnimationGroup::Stopped); + QCOMPARE(anim->currentValue().toInt(), 0); + QCOMPARE(runningSpy.count(), 0); + QCOMPARE(finishedSpy.count(), 0); + + anim->start(); + + QCOMPARE(anim->state(), QAnimationGroup::Stopped); + QCOMPARE(anim->currentValue().toInt(), 0); + QCOMPARE(runningSpy.count(), 0); + QCOMPARE(finishedSpy.count(), 0); +} QTEST_MAIN(tst_QPropertyAnimation) #include "tst_qpropertyanimation.moc" |