aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2012-05-09 11:50:01 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-09 05:38:22 +0200
commitf9eb1d4ed610b6a96a247d9da7316ed8b83a077b (patch)
treee148bc86d28e3a1f135087eda62a0db32fd1bf6f /tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
parentb15f96c3256264944a39fbf04cc186d980042571 (diff)
ScriptAction without scriptName shouldn't match a StateChangeScript
Change-Id: Idfce9b25fd2396771f45fc2487bc363edb56ddd6 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Diffstat (limited to 'tests/auto/quick/qquickanimations/tst_qquickanimations.cpp')
-rw-r--r--tests/auto/quick/qquickanimations/tst_qquickanimations.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
index 60b0465637..8cfdf74917 100644
--- a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
+++ b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
@@ -108,6 +108,7 @@ private slots:
void loopingBug();
void anchorBug();
void pathAnimationInOutBackBug();
+ void scriptActionBug();
};
#define QTIMED_COMPARE(lhs, rhs) do { \
@@ -1377,6 +1378,18 @@ void tst_qquickanimations::anchorBug()
QCOMPARE(static_cast<QQuickBulkValueAnimator*>(animation.qtAnimation())->easingCurve(), QEasingCurve(QEasingCurve::InOutBack));
}
+//ScriptAction should not match a StateChangeScript if no scriptName has been specified
+void tst_qquickanimations::scriptActionBug()
+{
+ QQmlEngine engine;
+ QQmlComponent c(&engine, testFileUrl("scriptActionBug.qml"));
+ QObject *obj = c.create();
+
+ //Both the ScriptAction and StateChangeScript should be triggered
+ QCOMPARE(obj->property("actionTriggered").toBool(), true);
+ QCOMPARE(obj->property("actionTriggered").toBool(), true);
+}
+
QTEST_MAIN(tst_qquickanimations)
#include "tst_qquickanimations.moc"