summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2012-07-18 15:39:20 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-26 23:10:46 +0200
commitb976589a66eafc7b69195a690210fe1d02bb141e (patch)
treeb2b1b9d049dd2806444e9cc3bfd1269675c8a0c1 /tests
parent6ebee9f57e0e4e189b667605bfe9436504bd7385 (diff)
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 <michael.goddard@nokia.com> Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp29
1 files changed, 4 insertions, 25 deletions
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());