summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-01-14 07:46:44 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-01-14 07:46:44 (GMT)
commit56779ad993c9ea72689921f1b7b0942721fe5648 (patch)
treeeb6ce23daf400fba69d70406244a027cd82989ae /tests
parentde0a8ecadc072c0c3d7dd28af9ca544e48f3caed (diff)
downloadQt-56779ad993c9ea72689921f1b7b0942721fe5648.zip
Qt-56779ad993c9ea72689921f1b7b0942721fe5648.tar.gz
Qt-56779ad993c9ea72689921f1b7b0942721fe5648.tar.bz2
Test color "from" property.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/animations/tst_animations.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/declarative/animations/tst_animations.cpp b/tests/auto/declarative/animations/tst_animations.cpp
index 588234c..35eae73 100644
--- a/tests/auto/declarative/animations/tst_animations.cpp
+++ b/tests/auto/declarative/animations/tst_animations.cpp
@@ -151,6 +151,15 @@ void tst_animations::simpleColor()
animation.setCurrentTime(125);
QVERIFY(animation.currentTime() == 125);
QCOMPARE(rect.color(), QColor::fromRgbF(0.498039, 0, 0.498039, 1));
+
+ rect.setColor(QColor("green"));
+ animation.setFrom(QColor("blue"));
+ QVERIFY(animation.from() == QColor("blue"));
+ animation.restart();
+ QCOMPARE(rect.color(), QColor("blue"));
+ QVERIFY(animation.isRunning());
+ animation.setCurrentTime(125);
+ QCOMPARE(rect.color(), QColor::fromRgbF(0.498039, 0, 0.498039, 1));
}
void tst_animations::alwaysRunToEnd()