summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMilla Pohjanheimo <milla.pohjanheimo@qt.io>2016-09-23 09:21:05 +0300
committerYoann Lopes <yoann.lopes@qt.io>2016-09-23 07:02:11 +0000
commit9d9a29bcc31101e394ea484f61985cac75524ba1 (patch)
tree65ae0bb2b90ceab724f7ee4f14ec9082dbe1ee93 /tests
parent7d00a457e455e159a3dde30ad798be744cf38bb1 (diff)
downloadqtmultimedia-9d9a29bcc31101e394ea484f61985cac75524ba1.tar.gz
Stabilize tst_QAudioOutput::pull() and push() autotests
Same as 7d00a457e455e159a3dde30ad798be744cf38bb1. Change-Id: Iaf4a9d4eb5b5afe307a82af6f1a7fdf3e49f08ac Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp b/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp
index dfe9d3e54..e36d38f4a 100644
--- a/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp
+++ b/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp
@@ -532,8 +532,8 @@ void tst_QAudioOutput::pull()
QTest::qWait(3000); // 3 seconds should be plenty
QVERIFY2(audioFile->atEnd(), "didn't play to EOF");
- QVERIFY2((stateSignal.count() == 1),
- QString("didn't emit IdleState signal when at EOF, got %1 signals instead").arg(stateSignal.count()).toLocal8Bit().constData());
+ QVERIFY(stateSignal.count() > 0);
+ QCOMPARE(qvariant_cast<QAudio::State>(stateSignal.last().at(0)), QAudio::IdleState);
QVERIFY2((audioOutput.state() == QAudio::IdleState), "didn't transitions to IdleState when at EOF");
stateSignal.clear();
@@ -709,8 +709,8 @@ void tst_QAudioOutput::push()
QTest::qWait(3000); // 3 seconds should be plenty
QVERIFY2(audioFile->atEnd(), "didn't play to EOF");
- QVERIFY2((stateSignal.count() == 1),
- QString("didn't emit IdleState signal when at EOF, got %1 signals instead").arg(stateSignal.count()).toLocal8Bit().constData());
+ QVERIFY(stateSignal.count() > 0);
+ QCOMPARE(qvariant_cast<QAudio::State>(stateSignal.last().at(0)), QAudio::IdleState);
QVERIFY2((audioOutput.state() == QAudio::IdleState), "didn't transitions to IdleState when at EOF");
stateSignal.clear();