summaryrefslogtreecommitdiffstats
path: root/tests/auto/unit/qradiotuner/tst_qradiotuner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/unit/qradiotuner/tst_qradiotuner.cpp')
-rw-r--r--tests/auto/unit/qradiotuner/tst_qradiotuner.cpp47
1 files changed, 45 insertions, 2 deletions
diff --git a/tests/auto/unit/qradiotuner/tst_qradiotuner.cpp b/tests/auto/unit/qradiotuner/tst_qradiotuner.cpp
index c42642283..05b604476 100644
--- a/tests/auto/unit/qradiotuner/tst_qradiotuner.cpp
+++ b/tests/auto/unit/qradiotuner/tst_qradiotuner.cpp
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the Qt Toolkit.
+** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
@@ -41,10 +41,50 @@
//TESTED_COMPONENT=src/multimedia
-#include "tst_qradiotuner.h"
+#include <QtTest/QtTest>
+#include <QDebug>
+#include <QTimer>
+
+#include <qmediaobject.h>
+#include <qmediacontrol.h>
+#include <qmediaservice.h>
+#include <qradiotunercontrol.h>
+#include <qradiotuner.h>
+
+#include "mockmediaserviceprovider.h"
+#include "mockmediaservice.h"
+#include "mockradiotunercontrol.h"
QT_USE_NAMESPACE
+class tst_QRadioTuner: public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void initTestCase();
+ void cleanupTestCase();
+
+private slots:
+ void testNullService();
+ void testNullControl();
+ void testBand();
+ void testFrequency();
+ void testMute();
+ void testSearch();
+ void testVolume();
+ void testSignal();
+ void testStereo();
+ void testSearchAllStations();
+ void errorSignal();
+
+private:
+ MockRadioTunerControl *mock;
+ MockMediaService *service;
+ MockMediaServiceProvider *provider;
+ QRadioTuner *radio;
+};
+
void tst_QRadioTuner::initTestCase()
{
qRegisterMetaType<QRadioTuner::State>("QRadioTuner::State");
@@ -334,3 +374,6 @@ void tst_QRadioTuner::errorSignal()
spy.clear();
radio.stop();
}
+
+QTEST_GUILESS_MAIN(tst_QRadioTuner)
+#include "tst_qradiotuner.moc"