aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2011-11-23 15:30:14 +1000
committerQt by Nokia <qt-info@nokia.com>2011-11-23 06:35:30 +0100
commit7ccace3c47ae479381c44892b874a8beb6f84b85 (patch)
tree90d6053fb536fa8aed89b0453da2a1acfd46f25b /tests/auto/declarative
parent0ce1d0c0e41dab04b2267fed1fe20b70884765a4 (diff)
Stabilize Behavior tests.
Change-Id: I6ef68fa5f8fd7731c3e683de517ec3a2cb05365b Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
index 608cdac3a8..d1c1ca7d9c 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
+++ b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
@@ -57,6 +57,7 @@ public:
tst_qdeclarativebehaviors() {}
private slots:
+ void init() { qApp->processEvents(); } //work around animation timer bug (QTBUG-22865)
void simpleBehavior();
void scriptTriggered();
void cppTriggered();
@@ -124,7 +125,6 @@ void tst_qdeclarativebehaviors::cppTriggered()
innerRect->setProperty("x", 200);
QTRY_VERIFY(innerRect->x() > 0);
- QEXPECT_FAIL("", "QTBUG-21001", Continue);
QTRY_VERIFY(innerRect->x() < 200); //i.e. the behavior has been triggered
delete rect;
@@ -382,6 +382,8 @@ void tst_qdeclarativebehaviors::groupedPropertyCrash()
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("groupedPropertyCrash.qml")));
QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create());
QVERIFY(rect); //don't crash
+
+ delete rect;
}
//QTBUG-5491
@@ -398,6 +400,8 @@ void tst_qdeclarativebehaviors::runningTrue()
QSignalSpy runningSpy(animation, SIGNAL(runningChanged(bool)));
rect->setProperty("myValue", 180);
QTRY_VERIFY(runningSpy.count() > 0);
+
+ delete rect;
}
//QTBUG-12295
@@ -415,9 +419,6 @@ void tst_qdeclarativebehaviors::sameValue()
QCOMPARE(target->x(), qreal(100));
target->setProperty("x", 0);
-#ifdef QT_BUILD_INTERNAL
- QEXPECT_FAIL("", "QTBUG-12295 - Behaviour on x {} does not work consistently.", Continue);
-#endif
QTRY_VERIFY(target->x() != qreal(0) && target->x() != qreal(100));
QTRY_VERIFY(target->x() == qreal(0)); //make sure Behavior has finished.
@@ -428,6 +429,8 @@ void tst_qdeclarativebehaviors::sameValue()
//even though we set 0 twice in a row.
target->setProperty("x", 0);
QTRY_VERIFY(target->x() != qreal(0) && target->x() != qreal(100));
+
+ delete rect;
}
//QTBUG-18362