From f7ca7ae50ef1e36a85dc3eb8541aaa8907176447 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Thu, 23 Jan 2014 14:50:01 +0100 Subject: [PATCH] Make the QEXPECT_FAIL agree with the QVERIFY2 condition below MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../corelib/animation/qpauseanimation/tst_qpauseanimation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp b/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp index 529069552b..419fa1af20 100644 --- a/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp +++ b/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp @@ -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(