summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qaudioinput/tst_qaudioinput.cpp3
-rw-r--r--tests/auto/qaudiooutput/tst_qaudiooutput.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qaudioinput/tst_qaudioinput.cpp b/tests/auto/qaudioinput/tst_qaudioinput.cpp
index 69b507d..3945364 100644
--- a/tests/auto/qaudioinput/tst_qaudioinput.cpp
+++ b/tests/auto/qaudioinput/tst_qaudioinput.cpp
@@ -139,12 +139,14 @@ void tst_QAudioInput::pullFile()
// Always have default states, before start
QVERIFY(audio->state() == QAudio::StopState);
QVERIFY(audio->error() == QAudio::NoError);
+ QVERIFY(audio->clock() == 0);
audio->start(&filename);
QTest::qWait(20);
// Check state and periodSize() are valid non-zero values.
QVERIFY(audio->state() == QAudio::ActiveState);
QVERIFY(audio->error() == QAudio::NoError);
+ QVERIFY(audio->clock() > 0);
QVERIFY(audio->periodSize() > 0);
QVERIFY(stateSignal.count() == 1); // State changed to QAudio::ActiveState
@@ -157,6 +159,7 @@ void tst_QAudioInput::pullFile()
audio->stop();
QTest::qWait(20);
QVERIFY(audio->state() == QAudio::StopState);
+ QVERIFY(audio->clock() == 0);
// Can only check to make sure we got at least 1 more signal, but can be more.
QVERIFY(stateSignal.count() > 1);
diff --git a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
index f1c75dc..b90873e 100644
--- a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
+++ b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
@@ -142,6 +142,7 @@ void tst_QAudioOutput::pullFile()
// Always have default states, before start
QVERIFY(audio->state() == QAudio::StopState);
QVERIFY(audio->error() == QAudio::NoError);
+ QVERIFY(audio->clock() == 0);
audio->start(&file);
QTest::qWait(20); // wait 20ms
@@ -149,6 +150,7 @@ void tst_QAudioOutput::pullFile()
QVERIFY(audio->state() == QAudio::ActiveState);
QVERIFY(audio->error() == QAudio::NoError);
QVERIFY(audio->periodSize() > 0);
+ QVERIFY(audio->clock() > 0);
QVERIFY(stateSignal.count() == 1); // State changed to QAudio::ActiveState
// Wait until finished...
@@ -160,6 +162,7 @@ void tst_QAudioOutput::pullFile()
audio->stop();
QTest::qWait(20); // wait 20ms
QVERIFY(audio->state() == QAudio::StopState);
+ QVERIFY(audio->clock() == 0);
// Can only check to make sure we got at least 1 more signal, but can be more.
QVERIFY(stateSignal.count() > 1);