summaryrefslogtreecommitdiffstats
path: root/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2012-07-31 10:26:28 +1000
committerQt by Nokia <qt-info@nokia.com>2012-08-03 04:11:48 +0200
commita6e88ea87f544638cf15f3bb61ccc276b1cc5664 (patch)
tree49e2b26bab1ea7ea302a529a2deadbe262683f82 /tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp
parent86553ef8113259a1e80256ee51de981e416d102e (diff)
Added check to qsound and qsoundeffect unit tests for audio support
- skip tests if QSoundEffect::supportedMimeTypes() returns empty list Change-Id: I0f8d6f854c46b74f8518c4d969bd31ea167d20b2 Reviewed-by: Ling Hu <ling.hu@nokia.com> Reviewed-by: Michael Goddard <michael.goddard@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 adcb9cd85..b01bf1e87 100644
--- a/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp
+++ b/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp
@@ -98,6 +98,11 @@ void tst_QSoundEffect::cleanup()
void tst_QSoundEffect::initTestCase()
{
+ // Only perform tests if audio device exists
+ QStringList mimeTypes = sound->supportedMimeTypes();
+ if (mimeTypes.empty())
+ QSKIP("No audio devices available");
+
QString testFileName = QStringLiteral("test.wav");
QString fullPath = QFINDTESTDATA(testFileName);
QVERIFY2(!fullPath.isEmpty(), qPrintable(QStringLiteral("Unable to locate ") + testFileName));