summaryrefslogtreecommitdiffstats
path: root/tests/auto/integration/qsoundeffect
diff options
context:
space:
mode:
authorMithra Pattison <mithra.pattison@nokia.com>2011-12-22 15:12:03 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-30 05:03:45 +0100
commitf9ec11a25e0d04485745fbb9d9fb929da3459826 (patch)
treefbbdc623b99b9da4eeffbc502324f94d2e40942f /tests/auto/integration/qsoundeffect
parentc13a13c4866bdacc066d9921290eed41e1b54a8b (diff)
Add new implementation of QSound class
Added a re-implementation of QSound, using functionality derived from QSoundEffect. QSound API remains the same as the original 4.x version. It offers both a static interface (with auto resource cleanup on sound completion), as well as an object instance interface for more detailed control. Change-Id: I85c00dd88547f8dea9b1e1ef2da31d2f2e28a172 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Diffstat (limited to 'tests/auto/integration/qsoundeffect')
-rw-r--r--tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp b/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp
index 678d2be36..f2c576a05 100644
--- a/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp
+++ b/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp
@@ -106,16 +106,20 @@ void tst_QSoundEffect::testSource()
void tst_QSoundEffect::testLooping()
{
- QSignalSpy readSignal(sound, SIGNAL(loopCountChanged()));
+ QSignalSpy readSignal_Count(sound, SIGNAL(loopCountChanged()));
+ QSignalSpy readSignal_Remaining(sound, SIGNAL(loopsRemainingChanged()));
sound->setLoopCount(5);
QCOMPARE(sound->loopCount(),5);
+ QCOMPARE(readSignal_Count.count(),1);
sound->play();
// test.wav is about 200ms, wait until it has finished playing 5 times
QTest::qWait(3000);
+ QCOMPARE(sound->loopsRemaining(), 0);
+ QCOMPARE(readSignal_Remaining.count(),5);
}
void tst_QSoundEffect::testVolume()