From 56779ad993c9ea72689921f1b7b0942721fe5648 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 14 Jan 2010 17:46:44 +1000 Subject: Test color "from" property. --- tests/auto/declarative/animations/tst_animations.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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() -- cgit v0.12