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') 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 From 481dd30e2f62e6179fbb95d6b7a667813338dd00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pasi=20Pet=C3=A4j=C3=A4j=C3=A4rvi?= Date: Mon, 11 Jan 2016 13:42:00 +0200 Subject: Remove testing category to empty string Not all backends have empty default category Change-Id: I55025bf213063c5fd64dd5be4031aabf3a148a7b Reviewed-by: Yoann Lopes --- tests/auto/integration/qml/soundeffect/tst_soundeffect.qml | 1 - 1 file changed, 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/integration/qml/soundeffect/tst_soundeffect.qml b/tests/auto/integration/qml/soundeffect/tst_soundeffect.qml index 17908af94..f39dc1f75 100644 --- a/tests/auto/integration/qml/soundeffect/tst_soundeffect.qml +++ b/tests/auto/integration/qml/soundeffect/tst_soundeffect.qml @@ -134,7 +134,6 @@ Item { verify(sound1.muted == false) verify(sound1.playing == false) verify(sound1.status == 1) // Status.Loading - verify(sound1.category == "") } function test_muting() { -- cgit v1.2.3 From dd0fa191ffa22adc2e5a8a08293aea918780b6ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pasi=20Pet=C3=A4j=C3=A4j=C3=A4rvi?= Date: Wed, 13 Jan 2016 14:44:12 +0200 Subject: Fix clearing signals already send after first part of audio data Previous place for clearing received signal could errounsely clear already sent signal which causes next signalState comparison to fail on some platform. Change-Id: Iaffdbbcab1ec9afa0be6f1f7b7aee62b981ee319 Reviewed-by: Yoann Lopes --- tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp b/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp index 81aa97d91..07043e9ce 100755 --- a/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp +++ b/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp @@ -702,11 +702,11 @@ void tst_QAudioOutput::push() QVERIFY2((audioOutput.state() == QAudio::ActiveState), "didn't transition to ActiveState after receiving data"); QVERIFY2((audioOutput.error() == QAudio::NoError), "error state is not equal to QAudio::NoError after receiving data"); firstBuffer = false; + stateSignal.clear(); } } else QTest::qWait(20); } - stateSignal.clear(); // Wait until playback finishes QTest::qWait(3000); // 3 seconds should be plenty -- cgit v1.2.3 From 8d84a30e4d5ebec6e9c921ca855fc0cc5f1d9269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pasi=20Pet=C3=A4j=C3=A4j=C3=A4rvi?= Date: Thu, 14 Jan 2016 15:56:00 +0200 Subject: Be more permissive in QSoundEffect integration test. Change-Id: I9f92fda79bb359f8fa53aa11b9b6889cd35fcb6e Reviewed-by: Yoann Lopes --- tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp b/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp index e8ea3a487..604607ab0 100644 --- a/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp +++ b/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp @@ -174,7 +174,7 @@ void tst_QSoundEffect::testLooping() QVERIFY(readSignal_Remaining.count() > 0); // wait for the sound to be played several times - QTRY_COMPARE(sound->loopsRemaining(), 20); + QTRY_VERIFY(sound->loopsRemaining() <= 20); QVERIFY(readSignal_Remaining.count() >= 10); readSignal_Count.clear(); readSignal_Remaining.clear(); -- cgit v1.2.3