From b976589a66eafc7b69195a690210fe1d02bb141e Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Wed, 18 Jul 2012 15:39:20 +1000 Subject: Replace QSoundEffect backend using qmedia with qaudiooutput implementation - Use backend built on QAudioOutput - Fixed unit test so backend will pass Change-Id: I2f2a7d8bf382127c5a5c333d6e36c79169754b4e Reviewed-by: Michael Goddard Reviewed-by: Kurt Korbatits --- .../integration/qsoundeffect/tst_qsoundeffect.cpp | 29 +++------------------- 1 file changed, 4 insertions(+), 25 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 131aed036..adcb9cd85 100644 --- a/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp +++ b/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp @@ -155,10 +155,7 @@ void tst_QSoundEffect::testLooping() // test.wav is about 200ms, wait until it has finished playing 5 times QTestEventLoop::instance().enterLoop(3); - QCOMPARE(sound->loopsRemaining(), 0); -#ifdef Q_OS_MAC - QEXPECT_FAIL("", "QTBUG-26488 Fails on Mac", Abort); -#endif + QTRY_COMPARE(sound->loopsRemaining(), 0); QCOMPARE(readSignal_Remaining.count(),5); } @@ -193,7 +190,7 @@ void tst_QSoundEffect::testPlaying() QTestEventLoop::instance().enterLoop(1); sound->play(); QTestEventLoop::instance().enterLoop(1); - QCOMPARE(sound->isPlaying(), true); + QTRY_COMPARE(sound->isPlaying(), true); sound->stop(); //empty source @@ -201,17 +198,14 @@ void tst_QSoundEffect::testPlaying() QTestEventLoop::instance().enterLoop(1); sound->play(); QTestEventLoop::instance().enterLoop(1); -#ifdef Q_OS_MAC - QEXPECT_FAIL("", "QTBUG-26488 Fails on Mac", Abort); -#endif - QCOMPARE(sound->isPlaying(), false); + QTRY_COMPARE(sound->isPlaying(), false); //invalid source sound->setSource(QUrl((QLatin1String("invalid source")))); QTestEventLoop::instance().enterLoop(1); sound->play(); QTestEventLoop::instance().enterLoop(1); - QTRY_VERIFY(!sound->isPlaying()); + QTRY_COMPARE(sound->isPlaying(), false); sound->setLoopCount(1); // TODO: What if one of the tests fail? } @@ -219,9 +213,6 @@ void tst_QSoundEffect::testPlaying() void tst_QSoundEffect::testStatus() { sound->setSource(QUrl()); -#ifdef Q_OS_MAC - QEXPECT_FAIL("", "QTBUG-26488 Fails on Mac", Abort); -#endif QCOMPARE(sound->status(), QSoundEffect::Null); //valid source @@ -281,9 +272,6 @@ void tst_QSoundEffect::testSetSourceWhileLoading() QVERIFY(sound->isPlaying()); sound->setSource(QUrl()); -#ifdef Q_OS_MAC - QEXPECT_FAIL("", "QTBUG-26488 Fails on Mac", Abort); -#endif QCOMPARE(sound->status(), QSoundEffect::Null); sound->setSource(url2); @@ -314,9 +302,6 @@ void tst_QSoundEffect::testSetSourceWhilePlaying() QVERIFY(sound->isPlaying()); sound->setSource(QUrl()); -#ifdef Q_OS_MAC - QEXPECT_FAIL("", "QTBUG-26488 Fails on Mac", Abort); -#endif QCOMPARE(sound->status(), QSoundEffect::Null); sound->setSource(url2); @@ -338,9 +323,6 @@ void tst_QSoundEffect::testSetSourceWhilePlaying() void tst_QSoundEffect::testSupportedMimeTypes() { QStringList mimeTypes = sound->supportedMimeTypes(); -#ifdef Q_OS_MAC - QEXPECT_FAIL("", "QTBUG-26488 Fails on Mac", Abort); -#endif QVERIFY(!mimeTypes.empty()); QVERIFY(mimeTypes.indexOf(QLatin1String("audio/wav")) != -1 || mimeTypes.indexOf(QLatin1String("audio/x-wav")) != -1 || @@ -356,9 +338,6 @@ void tst_QSoundEffect::testCorruptFile() QVERIFY(!sound->isPlaying()); QVERIFY(sound->status() == QSoundEffect::Loading || sound->status() == QSoundEffect::Error); QTRY_COMPARE(sound->status(), QSoundEffect::Error); -#ifdef Q_OS_MAC - QEXPECT_FAIL("", "QTBUG-26488 Fails on Mac", Abort); -#endif QCOMPARE(statusSpy.count(), 2); sound->play(); QVERIFY(!sound->isPlaying()); -- cgit v1.2.3