summaryrefslogtreecommitdiff
path: root/tests/auto/qplacemanager
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2011-09-16 12:16:52 +1000
committerQt by Nokia <qt-info@nokia.com>2011-09-26 08:50:46 +0200
commit8d5953c49acf9c5c6208b23f8e38014aaeb634ce (patch)
treedbebb1bc8370343db0e6fd5f6d5c2e2df8ced265 /tests/auto/qplacemanager
parentbe950c52a338b1c93bdc6b3ceb1322d8fc22f3c4 (diff)
downloadqtlocation-8d5953c49acf9c5c6208b23f8e38014aaeb634ce.tar.gz
Remove unused code in QPlaceManager.
Change-Id: I2594e33049c4901c641c4e1a4347b7ee1952ecd8 Reviewed-on: http://codereview.qt-project.org/5273 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: abcd <qt_abcd1@ovi.com> Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'tests/auto/qplacemanager')
-rw-r--r--tests/auto/qplacemanager/tst_qplacemanager.cpp33
1 files changed, 26 insertions, 7 deletions
diff --git a/tests/auto/qplacemanager/tst_qplacemanager.cpp b/tests/auto/qplacemanager/tst_qplacemanager.cpp
index a5f0e870..07ceff15 100644
--- a/tests/auto/qplacemanager/tst_qplacemanager.cpp
+++ b/tests/auto/qplacemanager/tst_qplacemanager.cpp
@@ -50,33 +50,52 @@ QT_USE_NAMESPACE
class tst_QPlaceManager : public QObject
{
Q_OBJECT
-public:
- tst_QPlaceManager();
private Q_SLOTS:
void initTestCase();
+ void cleanupTestCase();
+
+ void testMetadata();
+ void testLocale();
private:
QGeoServiceProvider *provider;
QPlaceManager *placeManager;
};
-tst_QPlaceManager::tst_QPlaceManager()
-{
-}
-
void tst_QPlaceManager::initTestCase()
{
QStringList providers = QGeoServiceProvider::availableServiceProviders();
- providers.contains("qmlgeo.test.plugin");
+ QVERIFY(providers.contains("qmlgeo.test.plugin"));
provider = new QGeoServiceProvider("qmlgeo.test.plugin");
placeManager = provider->placeManager();
QVERIFY(placeManager);
+}
+
+void tst_QPlaceManager::testMetadata()
+{
+ QCOMPARE(placeManager->managerName(), QLatin1String("qmlgeo.test.plugin"));
+ QCOMPARE(placeManager->managerVersion(), 3);
QVERIFY(placeManager->connectivityMode() == QPlaceManager::OnlineMode);
}
+void tst_QPlaceManager::testLocale()
+{
+ QCOMPARE(placeManager->locale(), QLocale());
+
+ QLocale locale(QLocale::Norwegian, QLocale::Norway);
+ placeManager->setLocale(locale);
+
+ QCOMPARE(placeManager->locale(), locale);
+}
+
+void tst_QPlaceManager::cleanupTestCase()
+{
+ delete provider;
+}
+
QTEST_MAIN(tst_QPlaceManager)
#include "tst_qplacemanager.moc"