diff options
Diffstat (limited to 'tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp')
-rw-r--r-- | tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp b/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp index fa98c8b16..7cbd57007 100644 --- a/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp +++ b/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp @@ -60,6 +60,7 @@ private slots: void testSetSourceWhileLoading(); void testSetSourceWhilePlaying(); + void testSupportedMimeTypes_data(); void testSupportedMimeTypes(); void testCorruptFile(); void testPlaying24Bits(); @@ -387,9 +388,19 @@ void tst_QSoundEffect::testSetSourceWhilePlaying() } } +void tst_QSoundEffect::testSupportedMimeTypes_data() +{ + // Verify also passing of audio device info as parameter + QTest::addColumn<QSoundEffect*>("instance"); + QTest::newRow("without QAudioDeviceInfo") << sound; + QAudioDeviceInfo deviceInfo(QAudioDeviceInfo::defaultOutputDevice()); + QTest::newRow("with QAudioDeviceInfo") << new QSoundEffect(deviceInfo, this); +} + void tst_QSoundEffect::testSupportedMimeTypes() { - QStringList mimeTypes = sound->supportedMimeTypes(); + QFETCH(QSoundEffect*, instance); + QStringList mimeTypes = instance->supportedMimeTypes(); QVERIFY(!mimeTypes.empty()); QVERIFY(mimeTypes.indexOf(QLatin1String("audio/wav")) != -1 || mimeTypes.indexOf(QLatin1String("audio/x-wav")) != -1 || |