summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>2016-01-11 13:52:50 +0200
committerYoann Lopes <yoann.lopes@theqtcompany.com>2016-01-19 15:31:04 +0000
commit42dc97388137b753fbe7dc77371a51dfbd98d127 (patch)
tree4d8e6b00ed5e5dfff06f2f088dcb39dcc7fc20c6
parente126dbb6fb7440882b49fb2fcbde53f4b0a5e180 (diff)
Fix tst_QAudioOutput::pushSuspendResume().5.5
Documentation states that state in push mode after suspend and resume should be QAudio::IdleState. Task-number: QTBUG-50390 Change-Id: I214f1808948ce862b62afd0fb9d245d0c7e4ad26 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
-rwxr-xr-xtests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp b/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp
index 07043e9c..b887d3f9 100755
--- a/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp
+++ b/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp
@@ -825,10 +825,10 @@ void tst_QAudioOutput::pushSuspendResume()
// but not too much or the rest of the file may be processed
QTest::qWait(20);
- // Check that QAudioOutput immediately transitions to ActiveState
+ // Check that QAudioOutput immediately transitions to IdleState
QVERIFY2((stateSignal.count() == 1),
QString("didn't emit signal after resume(), got %1 signals instead").arg(stateSignal.count()).toLocal8Bit().constData());
- QVERIFY2((audioOutput.state() == QAudio::ActiveState), "didn't transition to ActiveState after resume()");
+ QVERIFY2((audioOutput.state() == QAudio::IdleState), "didn't transition to IdleState after resume()");
QVERIFY2((audioOutput.error() == QAudio::NoError), "error state is not equal to QAudio::NoError after resume()");
stateSignal.clear();
@@ -837,6 +837,7 @@ void tst_QAudioOutput::pushSuspendResume()
if (audioOutput.bytesFree() >= audioOutput.periodSize()) {
qint64 len = audioFile->read(buffer.data(),audioOutput.periodSize());
written += feed->write(buffer.constData(), len);
+ QVERIFY2((audioOutput.state() == QAudio::ActiveState), "didn't transition to ActiveState after writing audio data");
} else
QTest::qWait(20);
}