summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/animations
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-09-03 01:27:32 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-09-03 01:27:32 (GMT)
commit0a73357d3851b4eb20483a05f434455f96ded10b (patch)
tree41a3b02e4fcb9e7aee3fecaafb83d07d3936a96c /tests/auto/declarative/animations
parent369509bd4c1caeda50d3e6e15f98ffafb136a17e (diff)
downloadQt-0a73357d3851b4eb20483a05f434455f96ded10b.zip
Qt-0a73357d3851b4eb20483a05f434455f96ded10b.tar.gz
Qt-0a73357d3851b4eb20483a05f434455f96ded10b.tar.bz2
Add one more animation test.
Diffstat (limited to 'tests/auto/declarative/animations')
-rw-r--r--tests/auto/declarative/animations/tst_animations.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/declarative/animations/tst_animations.cpp b/tests/auto/declarative/animations/tst_animations.cpp
index ff06a04..8e1abc6 100644
--- a/tests/auto/declarative/animations/tst_animations.cpp
+++ b/tests/auto/declarative/animations/tst_animations.cpp
@@ -15,6 +15,7 @@ private slots:
void simpleNumber();
void simpleColor();
void alwaysRunToEnd();
+ void dotProperty();
void badTypes();
void badProperties();
void mixedTypes();
@@ -74,6 +75,24 @@ void tst_animations::alwaysRunToEnd()
QCOMPARE(rect.x(), qreal(200));
}
+void tst_animations::dotProperty()
+{
+ QFxRect rect;
+ QmlNumberAnimation animation;
+ animation.setTarget(&rect);
+ animation.setProperty("border.width");
+ animation.setTo(10);
+ animation.start();
+ QTest::qWait(animation.duration() + 50);
+ QCOMPARE(rect.border()->width(), 10);
+
+ rect.border()->setWidth(1);
+ animation.start();
+ animation.pause();
+ animation.setCurrentTime(125);
+ QCOMPARE(rect.border()->width(), 5);
+}
+
void tst_animations::badTypes()
{
//don't crash