diff options
author | Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com> | 2016-01-11 17:20:29 +0200 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2016-01-13 12:49:29 +0000 |
commit | ba847185e2b0dfaa39fddb9845ad7208b0d1018d (patch) | |
tree | 6e13e170a1ba2d1c98c465089ca94204b9a0b40d | |
parent | 0521766417eef7f92eb8078b3b83e5473e00484e (diff) | |
download | qtmultimedia-ba847185e2b0dfaa39fddb9845ad7208b0d1018d.tar.gz |
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 <yoann.lopes@theqtcompany.com>
-rw-r--r-- | tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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); |