API unit tests from Maemo API test team.

A large number of tweaks and changes to original tests, and refactor
a lot of the mock backends to reduce duplication.

Changed viewfinder test case to use mock service and provider so
that it matches the image capture test case.

Reviewed-by: Jonas Rabbe
(cherry picked from commit e40bef5508a4165cec4a46b97115aed461027fa5)

Also licence header fix:
(cherry picked from commit e9ee9e8c48b45b97d62ee4a82e400fa9d8ea8107)

Change-Id: Ic59891d75563bb2e008a336eea859e8c44d8d831
Reviewed-on: http://codereview.qt.nokia.com/2078
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
This commit is contained in:
Michael Goddard
2011-07-25 15:02:51 +10:00
committed by Qt by Nokia
parent 1e4dda9710
commit a6128410da
94 changed files with 8814 additions and 2396 deletions

View File

@@ -244,7 +244,7 @@ void tst_QAudioOutput::initTestCase()
QVERIFY(testFormats.size());
foreach (format, testFormats) {
foreach (const QAudioFormat &format, testFormats) {
qint64 len = (format.frequency()*format.channels()*(format.sampleSize()/8)*2); // 2 seconds
createSineWaveData(format, len);
// Write generate sine wave data to file
@@ -488,6 +488,7 @@ void tst_QAudioOutput::pull()
audioFiles.at(i)->seek(WavHeader::headerLength());
audioOutput.start(audioFiles.at(i));
// Check that QAudioOutput immediately transitions to ActiveState
QTRY_VERIFY2((stateSignal.count() == 1),
QString("didn't emit signal on start(), got %1 signals instead").arg(stateSignal.count()).toLocal8Bit().constData());