summaryrefslogtreecommitdiffstats
path: root/tests/auto/integration/qaudiooutput
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-01-26 14:25:10 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-01-26 14:25:10 +0100
commit7610f6e9ba8b92df6d18b94fcec982064dffacbd (patch)
tree65653559c62cc451258543b87ff971371e8d8e05 /tests/auto/integration/qaudiooutput
parentac6f9d27b1610356303714c3f8d2f2ab2ca5883a (diff)
parent365e05bad8c4a42a449eeef257a16c6f8faca318 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Diffstat (limited to 'tests/auto/integration/qaudiooutput')
-rw-r--r--tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp b/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp
index 4df73a184..5274499a5 100644
--- a/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp
+++ b/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp
@@ -697,11 +697,11 @@ void tst_QAudioOutput::push()
QVERIFY2((audioOutput.state() == QAudio::ActiveState), "didn't transition to ActiveState after receiving data");
QVERIFY2((audioOutput.error() == QAudio::NoError), "error state is not equal to QAudio::NoError after receiving data");
firstBuffer = false;
+ stateSignal.clear();
}
} else
QTest::qWait(20);
}
- stateSignal.clear();
// Wait until playback finishes
QTest::qWait(3000); // 3 seconds should be plenty
@@ -820,10 +820,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();
@@ -832,6 +832,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);
}