From a8a74fe81acab07bfe068bff398555804629a88c Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 25 Jan 2017 11:21:32 +0100 Subject: Stabilize tst_QPropertyAnimation::noStartValue() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the qWait() and introduce a QTRY_COMPARE() checking for the end value first. Task-number: QTBUG-58402 Change-Id: I2d3758178de5f67881008f28c406076ad27c4a90 Reviewed-by: Jędrzej Nowacki --- .../corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp') diff --git a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp index c1a8fde504..b0b0a307e9 100644 --- a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp +++ b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp @@ -441,10 +441,8 @@ void tst_QPropertyAnimation::noStartValue() a.setDuration(250); a.start(); - QTest::qWait(300); - - QTRY_COMPARE(o.values.first(), 42); - QCOMPARE(o.values.last(), 420); + QTRY_COMPARE(o.values.value(o.values.size() - 1, -1), 420); + QCOMPARE(o.values.first(), 42); } void tst_QPropertyAnimation::noStartValueWithLoop() -- cgit v1.2.3