Stabilize one function in tst_qpauseanimation.cpp

Under load the timing may go wrong.

Change-Id: Iaa947fb9adcfccd2568337adbb17094996cce827
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
Frederik Gladhorn 2014-01-07 13:49:08 +01:00 committed by The Qt Project
parent 35f2a61426
commit 8059541199

View File

@ -259,14 +259,14 @@ void tst_QPauseAnimation::pauseResume()
animation.pause();
QVERIFY(animation.state() == QAbstractAnimation::Paused);
animation.start();
QTest::qWait(300);
QVERIFY(animation.state() == QAbstractAnimation::Stopped);
QTRY_COMPARE(animation.state(), QAbstractAnimation::Stopped);
#ifdef Q_OS_WIN
if (animation.m_updateCurrentTimeCount != 3)
QEXPECT_FAIL("", winTimerError, Abort);
#endif
QCOMPARE(animation.m_updateCurrentTimeCount, 3);
QVERIFY2(animation.m_updateCurrentTimeCount >= 3, qPrintable(
QString::fromLatin1("animation.m_updateCurrentTimeCount = %1").arg(animation.m_updateCurrentTimeCount)));
}
void tst_QPauseAnimation::sequentialPauseGroup()