diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-10-23 10:05:30 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-10-23 10:05:30 (GMT) |
commit | e751b8e9b0fdc1e23084a102ca6d86fea7f530d4 (patch) | |
tree | 45ea1097f9c2c42e53900bb91e0b7709541c7c1f /tests/auto/qpauseanimation | |
parent | cc4d3fbc317bc9044c3ce23569f0225b29af4fd5 (diff) | |
download | Qt-e751b8e9b0fdc1e23084a102ca6d86fea7f530d4.zip Qt-e751b8e9b0fdc1e23084a102ca6d86fea7f530d4.tar.gz Qt-e751b8e9b0fdc1e23084a102ca6d86fea7f530d4.tar.bz2 |
MAke sure we call setCurrentTime when an animation is started
This could be prevented by a pause animation currently running.
Reviewed-by: Leo
Diffstat (limited to 'tests/auto/qpauseanimation')
-rw-r--r-- | tests/auto/qpauseanimation/tst_qpauseanimation.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qpauseanimation/tst_qpauseanimation.cpp b/tests/auto/qpauseanimation/tst_qpauseanimation.cpp index b11efa0..2546163 100644 --- a/tests/auto/qpauseanimation/tst_qpauseanimation.cpp +++ b/tests/auto/qpauseanimation/tst_qpauseanimation.cpp @@ -260,6 +260,9 @@ void tst_QPauseAnimation::sequentialPauseGroup() animation3.setDuration(200); group.start(); + QCOMPARE(animation1.m_updateCurrentTimeCount, 1); + QCOMPARE(animation2.m_updateCurrentTimeCount, 0); + QCOMPARE(animation3.m_updateCurrentTimeCount, 0); QVERIFY(group.state() == QAbstractAnimation::Running); QVERIFY(animation1.state() == QAbstractAnimation::Running); @@ -267,6 +270,9 @@ void tst_QPauseAnimation::sequentialPauseGroup() QVERIFY(animation3.state() == QAbstractAnimation::Stopped); group.setCurrentTime(250); + QCOMPARE(animation1.m_updateCurrentTimeCount, 2); + QCOMPARE(animation2.m_updateCurrentTimeCount, 1); + QCOMPARE(animation3.m_updateCurrentTimeCount, 0); QVERIFY(group.state() == QAbstractAnimation::Running); QVERIFY(animation1.state() == QAbstractAnimation::Stopped); @@ -275,6 +281,9 @@ void tst_QPauseAnimation::sequentialPauseGroup() QVERIFY(animation3.state() == QAbstractAnimation::Stopped); group.setCurrentTime(500); + QCOMPARE(animation1.m_updateCurrentTimeCount, 2); + QCOMPARE(animation2.m_updateCurrentTimeCount, 2); + QCOMPARE(animation3.m_updateCurrentTimeCount, 1); QVERIFY(group.state() == QAbstractAnimation::Running); QVERIFY(animation1.state() == QAbstractAnimation::Stopped); |