From de0a8ecadc072c0c3d7dd28af9ca544e48f3caed Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 14 Jan 2010 17:40:30 +1000 Subject: fix test (required clicking!) --- tests/auto/declarative/animations/data/badproperty1.qml | 5 +---- tests/auto/declarative/animations/data/badproperty2.qml | 5 +---- tests/auto/declarative/animations/tst_animations.cpp | 8 ++++++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/auto/declarative/animations/data/badproperty1.qml b/tests/auto/declarative/animations/data/badproperty1.qml index 6f31fe8..fda322c 100644 --- a/tests/auto/declarative/animations/data/badproperty1.qml +++ b/tests/auto/declarative/animations/data/badproperty1.qml @@ -9,10 +9,6 @@ Rectangle { color: "red" width: 50; height: 50 x: 100; y: 100 - MouseRegion { - anchors.fill: parent - onClicked: if (Wrapper.state == "state1") Wrapper.state = ""; else Wrapper.state = "state1"; - } } states: State { name: "state1" @@ -21,4 +17,5 @@ Rectangle { transitions: Transition { ColorAnimation { target: MyRect; to: "red"; property: "border.colr"; duration: 1000 } } + Component.onCompleted: if (Wrapper.state == "state1") Wrapper.state = ""; else Wrapper.state = "state1"; } diff --git a/tests/auto/declarative/animations/data/badproperty2.qml b/tests/auto/declarative/animations/data/badproperty2.qml index c7d1673..0e8366a 100644 --- a/tests/auto/declarative/animations/data/badproperty2.qml +++ b/tests/auto/declarative/animations/data/badproperty2.qml @@ -9,10 +9,6 @@ Rectangle { color: "red" width: 50; height: 50 x: 100; y: 100 - MouseRegion { - anchors.fill: parent - onClicked: if (Wrapper.state == "state1") Wrapper.state = ""; else Wrapper.state = "state1"; - } } states: State { name: "state1" @@ -21,4 +17,5 @@ Rectangle { transitions: Transition { ColorAnimation { target: MyRect; to: "red"; property: "border"; duration: 1000 } } + Component.onCompleted: if (Wrapper.state == "state1") Wrapper.state = ""; else Wrapper.state = "state1"; } diff --git a/tests/auto/declarative/animations/tst_animations.cpp b/tests/auto/declarative/animations/tst_animations.cpp index d9a81c4..588234c 100644 --- a/tests/auto/declarative/animations/tst_animations.cpp +++ b/tests/auto/declarative/animations/tst_animations.cpp @@ -297,12 +297,16 @@ void tst_animations::badProperties() QmlEngine engine; QmlComponent c1(&engine, QUrl("file://" SRCDIR "/data/badproperty1.qml")); - QTest::ignoreMessage(QtWarningMsg, "QML ColorAnimation (file://" SRCDIR "/data/badproperty1.qml:22:9) Cannot animate non-existant property \"border.colr\""); + QByteArray message = "QML ColorAnimation (file://" SRCDIR "/data/badproperty1.qml:18:9) Cannot animate non-existant property \"border.colr\""; + QTest::ignoreMessage(QtWarningMsg, message); + QTest::ignoreMessage(QtWarningMsg, message); // why twice? QmlGraphicsRectangle *rect = qobject_cast(c1.create()); QVERIFY(rect); QmlComponent c2(&engine, QUrl("file://" SRCDIR "/data/badproperty2.qml")); - QTest::ignoreMessage(QtWarningMsg, "QML ColorAnimation (file://" SRCDIR "/data/badproperty2.qml:22:9) Cannot animate read-only property \"border\""); + message = "QML ColorAnimation (file://" SRCDIR "/data/badproperty2.qml:18:9) Cannot animate read-only property \"border\""; + QTest::ignoreMessage(QtWarningMsg, message); + QTest::ignoreMessage(QtWarningMsg, message); // why twice? rect = qobject_cast(c2.create()); QVERIFY(rect); -- cgit v0.12