summaryrefslogtreecommitdiffstats
path: root/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp
diff options
context:
space:
mode:
authorMichael Goddard <michael.goddard@nokia.com>2012-01-18 13:54:53 +1000
committerQt by Nokia <qt-info@nokia.com>2012-01-18 05:00:03 +0100
commitc40d79106c056057bfd38cd74c4d9c8df90277b3 (patch)
tree7612d538ef02d2b29fb9d17a06e2e89f044ad2ac /tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp
parent7e76391c5985cdd95de6baf5409793b11373f120 (diff)
Set the volume for our automatic integration tests.
These aren't manual test, so we don't care if you can't hear it. QSound does not have a volume property (yet). Change-Id: I6ef90262decf4630de84478215bfe8d259db4751 Reviewed-by: Ling Hu <ling.hu@nokia.com>
Diffstat (limited to 'tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp')
-rw-r--r--tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp b/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp
index d61e46336..c1c6818f9 100644
--- a/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp
+++ b/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp
@@ -94,6 +94,7 @@ void tst_QSoundEffect::testSource()
QSignalSpy readSignal(sound, SIGNAL(sourceChanged()));
sound->setSource(url);
+ sound->setVolume(0.1f);
QCOMPARE(sound->source(),url);
QCOMPARE(readSignal.count(),1);
@@ -110,6 +111,7 @@ void tst_QSoundEffect::testLooping()
QSignalSpy readSignal_Remaining(sound, SIGNAL(loopsRemainingChanged()));
sound->setLoopCount(5);
+ sound->setVolume(0.1f);
QCOMPARE(sound->loopCount(),5);
QCOMPARE(readSignal_Count.count(),1);
@@ -147,6 +149,7 @@ void tst_QSoundEffect::testMuting()
void tst_QSoundEffect::testPlaying()
{
sound->setLoopCount(QSoundEffect::Infinite);
+ sound->setVolume(0.1f);
//valid source
sound->setSource(url);
QTestEventLoop::instance().enterLoop(1);
@@ -200,6 +203,7 @@ void tst_QSoundEffect::testDestroyWhilePlaying()
{
QSoundEffect *instance = new QSoundEffect();
instance->setSource(url);
+ instance->setVolume(0.1f);
QTestEventLoop::instance().enterLoop(1);
instance->play();
QTest::qWait(500);
@@ -211,6 +215,7 @@ void tst_QSoundEffect::testDestroyWhileRestartPlaying()
{
QSoundEffect *instance = new QSoundEffect();
instance->setSource(url);
+ instance->setVolume(0.1f);
QTestEventLoop::instance().enterLoop(1);
instance->play();
QTest::qWait(1000);