Stabilize tst_QPropertyAnimation::noStartValue()

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 <jedrzej.nowacki@qt.io>
This commit is contained in:
Friedemann Kleint 2017-01-25 11:21:32 +01:00 committed by Friedemann Kleint
parent 056a35d02f
commit a8a74fe81a

View File

@ -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()