From ba847185e2b0dfaa39fddb9845ad7208b0d1018d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pasi=20Pet=C3=A4j=C3=A4j=C3=A4rvi?= Date: Mon, 11 Jan 2016 17:20:29 +0200 Subject: Remove checking exact remaining loop amount right after calling play() Depending on platform it is unknown how many times it has already been actually playing the audio. Change-Id: I27b65cee8de5f9f75ceda277ee22d86f7897ce7b Reviewed-by: Yoann Lopes --- tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tests/auto/integration/qsoundeffect') diff --git a/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp b/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp index 642c00ceb..e8ea3a487 100644 --- a/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp +++ b/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp @@ -150,8 +150,7 @@ void tst_QSoundEffect::testLooping() QCOMPARE(readSignal_Remaining.count(), 0); sound->play(); - QCOMPARE(sound->loopsRemaining(), 5); - QCOMPARE(readSignal_Remaining.count(), 1); + QVERIFY(readSignal_Remaining.count() > 0); // test.wav is about 200ms, wait until it has finished playing 5 times QTestEventLoop::instance().enterLoop(3); @@ -172,8 +171,7 @@ void tst_QSoundEffect::testLooping() QCOMPARE(readSignal_Remaining.count(), 0); sound->play(); - QCOMPARE(sound->loopsRemaining(), 30); - QCOMPARE(readSignal_Remaining.count(), 1); + QVERIFY(readSignal_Remaining.count() > 0); // wait for the sound to be played several times QTRY_COMPARE(sound->loopsRemaining(), 20); -- cgit v1.2.3