Make the QEXPECT_FAIL agree with the QVERIFY2 condition below
Even if the system is not under high load, this test can generate 4 updates on Windows. This is seems to be because the timer actually triggers before its supposed to (sometimes the second start() triggers an update right before the animation is done (at timestamp 399 for instance), forcing it to generate yet another timer event in order to reach the end)). Under high load conditions, too many things can break this test, usually it finishes even before the pause(), causing the QVERIFY(animation.state() == QAbstractAnimation::Paused); to fail. Change-Id: Id94c0d16656675bc6165b7795f3c41a30616a3ba Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>bb10
parent
73b54f85c5
commit
f7ca7ae50e
|
|
@ -262,7 +262,7 @@ void tst_QPauseAnimation::pauseResume()
|
|||
QTRY_COMPARE(animation.state(), QAbstractAnimation::Stopped);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
if (animation.m_updateCurrentTimeCount != 3)
|
||||
if (animation.m_updateCurrentTimeCount < 3)
|
||||
QEXPECT_FAIL("", winTimerError, Abort);
|
||||
#endif
|
||||
QVERIFY2(animation.m_updateCurrentTimeCount >= 3, qPrintable(
|
||||
|
|
|
|||
Loading…
Reference in New Issue