From a6a8e2b1918b2037c9d79e59aabf04ef09bee73e Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Fri, 23 Oct 2009 07:16:40 +1000 Subject: Update audio unit tests with clock() range checking. -Check to make sure clock() return is in microseconds. Reviewed-by:Justin McPherson --- tests/auto/qaudioinput/tst_qaudioinput.cpp | 2 +- tests/auto/qaudiooutput/tst_qaudiooutput.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/qaudioinput/tst_qaudioinput.cpp b/tests/auto/qaudioinput/tst_qaudioinput.cpp index 3945364..3efc346 100644 --- a/tests/auto/qaudioinput/tst_qaudioinput.cpp +++ b/tests/auto/qaudioinput/tst_qaudioinput.cpp @@ -146,7 +146,7 @@ void tst_QAudioInput::pullFile() // 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->clock() > 10000 && audio->clock() < 800000); QVERIFY(audio->periodSize() > 0); QVERIFY(stateSignal.count() == 1); // State changed to QAudio::ActiveState diff --git a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp index b46f88d..b001af1 100644 --- a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp +++ b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp @@ -150,7 +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(audio->clock() > 10000 && audio->clock() < 800000); QVERIFY(stateSignal.count() == 1); // State changed to QAudio::ActiveState // Wait until finished... -- cgit v0.12