summaryrefslogtreecommitdiffstats
path: root/tests/auto/qaudiooutput
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2009-09-23 08:53:36 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2009-09-23 08:55:20 (GMT)
commitb3a9565c99c44cdf4d3236de211110382c7b908b (patch)
tree3ded370d5e08fa9d3019c7b717ee98d8e2f7a0a4 /tests/auto/qaudiooutput
parent05647bc3a8d5085885dca398682b8b315bc79e6c (diff)
downloadQt-b3a9565c99c44cdf4d3236de211110382c7b908b.zip
Qt-b3a9565c99c44cdf4d3236de211110382c7b908b.tar.gz
Qt-b3a9565c99c44cdf4d3236de211110382c7b908b.tar.bz2
more meaningful output in tst_QAudioOutput::pullFile
Reviewed-by: TrustMe
Diffstat (limited to 'tests/auto/qaudiooutput')
-rw-r--r--tests/auto/qaudiooutput/tst_qaudiooutput.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
index 6356fb3..db2444b 100644
--- a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
+++ b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
@@ -117,37 +117,37 @@ void tst_QAudioOutput::notifyInterval()
void tst_QAudioOutput::pullFile()
{
if(available) {
- QFile filename(SRCDIR "4.wav");
- QVERIFY(filename.exists());
- filename.open(QIODevice::ReadOnly);
+ QFile file(SRCDIR "4.wav");
+ QVERIFY(file.exists());
+ file.open(QIODevice::ReadOnly);
QSignalSpy readSignal(audio, SIGNAL(notify()));
audio->setNotifyInterval(100);
- audio->start(&filename);
+ audio->start(&file);
QTestEventLoop::instance().enterLoop(1);
+ QCOMPARE(audio->totalTime(), qint64(692250));
// 4.wav is a little less than 700ms, so notify should fire 6 times!
QVERIFY(readSignal.count() >= 6);
- QVERIFY(audio->totalTime() == 692250);
audio->stop();
- filename.close();
+ file.close();
}
}
void tst_QAudioOutput::pushFile()
{
if(available) {
- QFile filename(SRCDIR "4.wav");
- QVERIFY(filename.exists());
- filename.open(QIODevice::ReadOnly);
+ QFile file(SRCDIR "4.wav");
+ QVERIFY(file.exists());
+ file.open(QIODevice::ReadOnly);
- const qint64 fileSize = filename.size();
+ const qint64 fileSize = file.size();
QIODevice* feed = audio->start(0);
char* buffer = new char[fileSize];
- filename.read(buffer, fileSize);
+ file.read(buffer, fileSize);
qint64 counter=0;
qint64 written=0;
@@ -162,7 +162,7 @@ void tst_QAudioOutput::pushFile()
QVERIFY(audio->totalTime() == 692250);
audio->stop();
- filename.close();
+ file.close();
delete [] buffer;
delete audio;
}