summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpropertyanimation
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-07-01 17:15:17 +0200
committerThierry Bastian <thierry.bastian@nokia.com>2009-07-01 17:16:12 +0200
commit29b71240d17a1557fd9a8d2ce7dcd450b07b57a8 (patch)
treec7abbef551f4db376973178fb1cc28905fda9524 /tests/auto/qpropertyanimation
parent0ee90990c24bf965317918074a5af683e94bdd40 (diff)
QAnimation: fix a jump in values when restarting an animation
Diffstat (limited to 'tests/auto/qpropertyanimation')
-rw-r--r--tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
index 09e12c3415..e76c8ef4a0 100644
--- a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
+++ b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
@@ -396,8 +396,13 @@ void tst_QPropertyAnimation::duration0()
animation.setEndValue(43);
QVERIFY(!animation.currentValue().isValid());
QCOMPARE(animation.currentValue().toInt(), 0);
+ animation.setStartValue(42);
+ QVERIFY(animation.currentValue().isValid());
+ QCOMPARE(animation.currentValue().toInt(), 42);
+
QCOMPARE(o.property("ole").toInt(), 42);
animation.setDuration(0);
+ QCOMPARE(animation.currentValue().toInt(), 43); //it is at the end
animation.start();
QCOMPARE(animation.state(), QAnimationGroup::Stopped);
QCOMPARE(animation.currentTime(), 0);