summaryrefslogtreecommitdiff
path: root/tests/auto
diff options
context:
space:
mode:
authorJean Gressmann <jean.gressmann@nokia.com>2012-03-28 12:31:25 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-13 02:16:51 +0200
commite3d9598cec4b9ad65cc17511159bdec532587682 (patch)
treea3470abc6123edba76768bac8e2300980b83e316 /tests/auto
parent8a548008c0786aeed69ddd7f13643a52f18cd389 (diff)
downloadqtlocation-e3d9598cec4b9ad65cc17511159bdec532587682.tar.gz
Routing backend tests for Nokia geoservices plugin
Splits declarative_core into 'frontend' (the current set of tests) and 'backend'. 'Backend' contains routing and geocoding tests against the REST service. This patch only implements the routing tests. Geocoding tests to follow. The new tests are dormant for now, can be activated by providing a suitable /var/lib/qt/qtlocation_tests_configuration.js file. Assuming that the file is present the test will only be run automatically for the Linux/x86 platform. You can manually run the tests by adding qtlocation-backend-tests to CONFIG. Change-Id: I6492c2a8a99594a88dbb1b9f7cf74c6af6d6d0b6 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative_core/backend/backend.pro2
-rw-r--r--tests/auto/declarative_core/backend/configuration.js12
-rw-r--r--tests/auto/declarative_core/backend/routing/Fixture.qml395
-rw-r--r--tests/auto/declarative_core/backend/routing/routing.pro19
-rw-r--r--tests/auto/declarative_core/backend/routing/tst_routing.cpp75
-rw-r--r--tests/auto/declarative_core/backend/routing/tst_routing.qml163
-rw-r--r--tests/auto/declarative_core/backend/routing/tst_routing_alternative_routes.qml113
-rw-r--r--tests/auto/declarative_core/backend/routing/tst_routing_excluded_areas.qml112
-rw-r--r--tests/auto/declarative_core/backend/routing/tst_routing_features.qml300
-rw-r--r--tests/auto/declarative_core/backend/routing/tst_routing_localization.qml94
-rw-r--r--tests/auto/declarative_core/backend/routing/tst_routing_no_route.qml107
-rw-r--r--tests/auto/declarative_core/backend/routing/tst_routing_optimizations.qml87
-rw-r--r--tests/auto/declarative_core/backend/routing/tst_routing_travelmode.qml117
-rw-r--r--tests/auto/declarative_core/backend/routing/tst_unsupported_setups.qml92
-rw-r--r--tests/auto/declarative_core/declarative_core.pro16
-rw-r--r--tests/auto/declarative_core/frontend/frontend.pro13
-rw-r--r--tests/auto/declarative_core/frontend/main.cpp (renamed from tests/auto/declarative_core/main.cpp)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_bounding_area.qml (renamed from tests/auto/declarative_core/tst_bounding_area.qml)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_category.qml (renamed from tests/auto/declarative_core/tst_category.qml)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_categorymodel.qml (renamed from tests/auto/declarative_core/tst_categorymodel.qml)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_contactdetail.qml (renamed from tests/auto/declarative_core/tst_contactdetail.qml)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_coordinate.qml (renamed from tests/auto/declarative_core/tst_coordinate.qml)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_editorialmodel.qml (renamed from tests/auto/declarative_core/tst_editorialmodel.qml)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_imagemodel.qml (renamed from tests/auto/declarative_core/tst_imagemodel.qml)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_map_routing.qml (renamed from tests/auto/declarative_core/tst_map_routing.qml)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_place.qml (renamed from tests/auto/declarative_core/tst_place.qml)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_placeicon.qml (renamed from tests/auto/declarative_core/tst_placeicon.qml)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_placerecommendationmodel.qml (renamed from tests/auto/declarative_core/tst_placerecommendationmodel.qml)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_placesearchmodel.qml (renamed from tests/auto/declarative_core/tst_placesearchmodel.qml)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_placesearchsuggestionmodel.qml (renamed from tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_plugin.qml (renamed from tests/auto/declarative_core/tst_plugin.qml)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_ratings.qml (renamed from tests/auto/declarative_core/tst_ratings.qml)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_reviewmodel.qml (renamed from tests/auto/declarative_core/tst_reviewmodel.qml)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_supplier.qml (renamed from tests/auto/declarative_core/tst_supplier.qml)0
-rw-r--r--tests/auto/declarative_core/frontend/tst_user.qml (renamed from tests/auto/declarative_core/tst_user.qml)0
35 files changed, 1704 insertions, 13 deletions
diff --git a/tests/auto/declarative_core/backend/backend.pro b/tests/auto/declarative_core/backend/backend.pro
new file mode 100644
index 00000000..2438c30a
--- /dev/null
+++ b/tests/auto/declarative_core/backend/backend.pro
@@ -0,0 +1,2 @@
+TEMPLATE = subdirs
+SUBDIRS += routing
diff --git a/tests/auto/declarative_core/backend/configuration.js b/tests/auto/declarative_core/backend/configuration.js
new file mode 100644
index 00000000..0e585c4e
--- /dev/null
+++ b/tests/auto/declarative_core/backend/configuration.js
@@ -0,0 +1,12 @@
+/* This file loads a fixed location Javascript file to configure the backend tests.
+
+ The configuration file should expose these variables (optional ones are in []:
+
+ pluginName : string # must be set to "nokia"
+ appId : string # Application Id received during registration process at https://api.forum.nokia.com/ovi-api/ui/registration
+ token : string
+ [proxy] : string # e.g. http://127.0.0.1:8081
+*/
+
+Qt.include("/var/lib/qt/qtlocation_tests_configuration.js")
+
diff --git a/tests/auto/declarative_core/backend/routing/Fixture.qml b/tests/auto/declarative_core/backend/routing/Fixture.qml
new file mode 100644
index 00000000..2ca096df
--- /dev/null
+++ b/tests/auto/declarative_core/backend/routing/Fixture.qml
@@ -0,0 +1,395 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtLocation 5.0
+import QtTest 1.0
+import "../configuration.js" as Configuration
+
+Item {
+ id: root
+
+ // Properties
+ property bool __modelDone: false
+ property bool __abort: false
+ property TestCase __testCase: null
+ property variant __data: null
+ property Plugin plugin: null
+ property RouteModel model: RouteModel {
+ query: RouteQuery { }
+
+ onStatusChanged: {
+ var str = errorString ? errorString : "<unknown>";
+
+ switch (status) {
+ case RouteModel.Loading:
+ case RouteModel.Null:
+ break;
+ case RouteModel.Error:
+ if (!__data.expectError)
+ root.fail("Error: " + str);
+ else
+ root.__modelDone = true
+ break;
+ case RouteModel.Ready:
+ root.__modelDone = true
+ break;
+ }
+ }
+ }
+
+ // Initialization
+ Component.onCompleted: {
+
+ if (Configuration &&
+ Configuration.pluginName) {
+ var code = "import QtLocation 5.0; Plugin { name: \"" + Configuration.pluginName + "\"; parameters: [ "
+
+ // proxy: string
+ if (Configuration.proxy && Configuration.proxy.length > 0) {
+ code += "PluginParameter { name: \"proxy\"; value: \"" + Configuration.proxy + "\" }, "
+ code += "PluginParameter { name: \"routing.proxy\"; value: \"" + Configuration.proxy + "\" }, "
+ }
+
+ // host: string
+ if (Configuration.routingHost && Configuration.routingHost.length > 0)
+ code += "PluginParameter { name: \"routing.host\"; value: \"" + Configuration.routingHost + "\" }, "
+
+ // app_id: string
+ //if (Configuration.appId && Configuration.appId.length > 0)
+ // code += "PluginParameter { name: \"app_id\"; value: \"" + Configuration.appId + "\" }, "
+
+ // token: string
+ if (Configuration.token && Configuration.token.length > 0)
+ code += "PluginParameter { name: \"token\"; value: \"" + Configuration.token + "\" }, "
+
+ // referer: string
+ if (Configuration.routingReferer && Configuration.routingReferer.length > 0)
+ code += "PluginParameter { name: \"routing.referer\"; value: \"" + Configuration.routingReferer + "\" }, "
+
+
+ // pluginParameters: array of key - value pairs
+ if (typeof(Configuration.pluginParameters) === "object") {
+ for (var i = 1; i < Configuration.pluginParameters.length; i += 2) {
+ code += "PluginParameter { name: \""
+ code += Configuration.pluginParameters[i - 1]
+ code += "\"; value: \""
+ code += Configuration.pluginParameters[i]
+ code += "\" }, "
+ }
+ }
+
+ // Plugin list termination
+ code += "PluginParameter {} ] ";
+ code += "}";
+
+ plugin = Qt.createQmlObject(code, root)
+ model.plugin = root.plugin
+ }
+ }
+
+ // TestCase functions, forwarded to fixture
+ function fail(_str) {
+ __abort = true;
+ __testCase.fail(_str);
+ }
+
+ function verify(_value) {
+ try
+ {
+ __testCase.verify(_value)
+ }
+ catch (e)
+ {
+ console.trace()
+ throw e
+ }
+ }
+
+ function compare(_lhs, _rhs) {
+ try
+ {
+ __testCase.compare(_lhs, _rhs)
+ }
+ catch (e)
+ {
+ console.trace()
+ throw e
+ }
+ }
+
+ // Helper functions for routing tests
+ function runTest(_test, _data) {
+
+ // In case the plugin hasn't been set up...
+ if (plugin === null) {
+ _test.skip("Valid Nokia plugin setup required. See the configuration.js file in the parent folder.")
+ return
+ }
+
+ reset(_test, _data)
+
+ for (var i = 0; i < _data.waypoints.length; ++i)
+ model.query.addWaypoint(_data.waypoints[i]);
+
+ if (_data.travelModes !== undefined)
+ model.query.travelModes = _data.travelModes
+
+ if (_data.locale !== undefined)
+ model.plugin.locales = _data.locale
+
+ if (_data.segmentDetail !== undefined)
+ model.query.segmentDetail = _data.segmentDetail
+
+ if (_data.routeOptimizations !== undefined)
+ model.query.routeOptimizations = _data.routeOptimizations
+
+ if (_data.numberAlternativeRoutes !== undefined)
+ model.query.numberAlternativeRoutes = _data.numberAlternativeRoutes
+
+ if (_data.weights !== undefined) {
+ for (var i = 1; i < _data.weights.length; i += 2)
+ model.query.setFeatureWeight(_data.weights[i-1], _data.weights[i])
+ }
+
+ if (_data.excludedAreas !== undefined) {
+ for (var i = 0; i < _data.excludedAreas.length; ++i)
+ model.query.addExcludedArea(_data.excludedAreas[i])
+ }
+
+ // possible optimization if we expect no route
+ if (_data.expectNoRouteFound || _data.expectError)
+ model.query.segmentDetail = RouteQuery.NoSegmentData
+
+ computeRoute();
+
+ if (_data.expectError) {
+ compare(_data.expectError, model.error)
+ return
+ }
+
+ if (_data.expectNoRouteFound)
+ _data.expectRoutes = 0
+
+ if (_data.expectRoutes === undefined)
+ _data.expectRoutes = 1
+
+ //console.debug("Expected " + _data.expectRoutes + ", got " + model.count + " routes")
+ compare(model.count, _data.expectRoutes)
+
+ if (model.count == 1) {
+ var route = model.get(0)
+
+ verify(route)
+ verify(route.path)
+ verify(route.path.length >= 2)
+
+ if (_data.expectedMinDistance) {
+ //console.debug("Actual distance: " + route.distance + ", expected min distance: " + _data.expectedMinDistance)
+ verify(route.distance >= _data.expectedMinDistance)
+ }
+
+ if (_data.expectedMaxDistance)
+ verify(route.distance <= _data.expectedMaxDistance)
+
+ if (_data.expectedMinTravelTime)
+ verify(route.travelTime >= _data.expectedMinTravelTime)
+
+ if (_data.expectedMaxTravelTime)
+ verify(route.travelTime <= _data.expectedMaxTravelTime)
+
+ if (_data.expectedMinSegments)
+ verify(route.segments.length >= _data.expectedMinSegments)
+ }
+
+ for (var i = 0; i < model.count; ++i) {
+ var route = model.get(i)
+ verify(route)
+ verify(route.path)
+ verify(route.path.length >= 2)
+ verifySegments(route.segments, _data)
+ }
+ }
+
+
+ function reset(_testCase, _data) {
+ __testCase = _testCase
+ __data = _data
+ model.plugin.locales = "en"
+ model.query.clearWaypoints()
+ model.query.segmentDetail = RouteQuery.BasicSegmentData
+ model.query.maneuverDetail = RouteQuery.BasicManeuvers
+ model.query.resetFeatureWeights()
+ model.query.clearExcludedAreas()
+ model.query.travelModes = RouteQuery.CarTravel
+ model.query.routeOptimizations = RouteQuery.FastestRoute
+ model.query.numberAlternativeRoutes = 0
+ model.reset()
+ __modelDone = false
+ __abort = false
+ }
+
+ function computeRoute() {
+ model.update()
+ while (!__modelDone && !__abort) {
+ __testCase.wait(100)
+ }
+ }
+
+ function verifySegments(_segments, _data) {
+ verify(_data)
+ verify(_segments)
+ verify(_segments.length >= 1)
+
+ // Grep for words in instruction text to ensure a particular
+ // route is (not) taken.
+ var noGrep = []
+ var grep = []
+
+ if (_data.grep) {
+ grep.length = _data.grep.length
+ for (var i = 0; i < grep.length; ++i)
+ grep[i] = false
+ }
+
+ if (_data.noGrep) {
+ noGrep.length = _data.noGrep.length
+ for (var i = 0; i < noGrep.length; ++i)
+ noGrep[i] = false
+ }
+
+ var toleranceStep = 1
+
+ // Do we have a custom tolerance (for ferry routing, public transport routing mostly)
+ if (_data.segmentTolerance)
+ toleranceStep = _data.segmentTolerance
+
+ var waypointIndex = 0
+ var maneuvers = 0;
+
+ for (var i = 0; i < _segments.length; ++i) {
+ var segment = _segments[i];
+ verify(segment) // not null / undefined
+ verify(segment.path) // not null / undefined
+ verify(segment.path.length >= 1) // at least the point of the maneuver
+ verify(segment.travelTime >= 0)
+ verify(segment.distance >= 0)
+
+ // verify the distances check out
+ var computed = 0
+ var tolerance = 0
+
+ for (var j = 1; j < segment.path.length; ++j, tolerance += toleranceStep) {
+ var prev = segment.path[j - 1];
+ var curr = segment.path[j];
+ verify(prev)
+ verify(curr)
+ verify(prev.isValid)
+ verify(curr.isValid)
+ computed += prev.distanceTo(curr);
+ }
+
+ // check the computation (not we may have zero length segments)
+ //console.debug("Computed: " + computed + ", REST " + segment.distance + " WPs: " + segment.path.length)
+ verify(Math.abs(computed - segment.distance) <= tolerance)
+
+ var maneuver = segment.maneuver
+ verify(maneuver) // always there, but possibly invalid
+
+ if (maneuver.valid) {
+ ++maneuvers
+ verify(maneuver.position) // with position
+ verify(maneuver.position.isValid) // ... that is valid
+ verify(maneuver.instructionText.length > 0) // some instruction text
+
+ if (_data.printInstructions)
+ console.debug(maneuvers + ". " + maneuver.instructionText)
+
+ // grep instruction text for terms in grep / no-grep lists
+ for (var g = 0; g < grep.length; ++g)
+ grep[g] |= maneuver.instructionText.indexOf(_data.grep[g]) >= 0
+
+ for (var g = 0; g < noGrep.length; ++g)
+ noGrep[g] |= maneuver.instructionText.indexOf(_data.noGrep[g]) >= 0
+
+ if (maneuver.waypointValid) {
+ var inputWaypoint = _data.waypoints[waypointIndex++];
+ verify(maneuver.waypoint) // must be there
+ verify(maneuver.waypoint.distanceTo(inputWaypoint) < 0.01) // should be the same
+ }
+ }
+ }
+
+ for (var i = 0; i < grep.length; ++i) {
+ if (!grep[i])
+ console.debug("Failed to grep '" + _data.grep[i] + "' in instructions")
+
+ verify(grep[i])
+ }
+
+ for (var i = 0; i < noGrep.length; ++i) {
+ if (noGrep[i])
+ console.debug("Instructions contain '" + _data.noGrep[i] + "'")
+
+ verify(!noGrep[i])
+ }
+
+ if (_data.expectedManeuvers)
+ compare(maneuvers, _data.expectedManeuvers)
+ }
+
+ function supportTravelModes() {
+ return [RouteQuery.PublicTransitTravel, RouteQuery.CarTravel, RouteQuery.PedestrianTravel]
+ }
+
+ function supportTravelModesBitset() {
+ var modesList = supportTravelModes()
+ var modesInt = 0
+ for (var i = 0; i < modesList.length; ++i)
+ modesInt |= modesList[i]
+
+ return modesInt
+ }
+}
+
+
+
+
diff --git a/tests/auto/declarative_core/backend/routing/routing.pro b/tests/auto/declarative_core/backend/routing/routing.pro
new file mode 100644
index 00000000..7931a860
--- /dev/null
+++ b/tests/auto/declarative_core/backend/routing/routing.pro
@@ -0,0 +1,19 @@
+TEMPLATE = app
+TARGET = tst_routing
+CONFIG += warn_on qmltestcase
+SOURCES += tst_routing.cpp
+
+CONFIG(qtlocation-backend-tests) DEFINES += QTLOCATION_BACKEND_TESTS
+
+QT += location quick testlib
+
+TESTDATA += Fixture.qml
+TESTDATA += tst_routing.qml
+TESTDATA += tst_routing_no_route.qml
+TESTDATA += tst_routing_features.qml
+TESTDATA += tst_routing_travelmode.qml
+TESTDATA += tst_routing_optimizations.qml
+TESTDATA += tst_routing_alternative_routes.qml
+TESTDATA += tst_routing_excluded_areas.qml
+TESTDATA += tst_routing_localization.qml
+TESTDATA += tst_unsupported_setups.qml
diff --git a/tests/auto/declarative_core/backend/routing/tst_routing.cpp b/tests/auto/declarative_core/backend/routing/tst_routing.cpp
new file mode 100644
index 00000000..8032f44a
--- /dev/null
+++ b/tests/auto/declarative_core/backend/routing/tst_routing.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtQuickTest/quicktest.h>
+#include <QFile>
+
+#define TESTNAME "routing backend tests"
+
+QT_USE_NAMESPACE
+
+// Empty tests so we can pick up the test results even if backend tests don't run
+class tst_routing : public QObject
+{
+ Q_OBJECT
+};
+
+int main(int argc, char **argv)
+{
+// We only want to run these tests in build configuration on Linux x86
+#if (defined(Q_OS_LINUX) && defined(Q_PROCESSOR_X86_32)) || defined(QTLOCATION_BACKEND_TESTS)
+ const QString configurationFile = QStringLiteral("/var/lib/qt/qtlocation_tests_configuration.js");
+
+ if (QFile::exists(configurationFile))
+ return quick_test_main(argc, argv, TESTNAME, 0, QUICK_TEST_SOURCE_DIR);
+
+ qWarning("File '/var/lib/qt/qtlocation_tests_configuration.js' does not exist.");
+ qWarning("Not running tests.");
+#else
+ qWarning("Not configured to run '" TESTNAME "'!");
+#endif
+
+ tst_routing tc;
+ return QTest::qExec(&tc, argc, argv);
+}
+
+#include "tst_routing.moc"
diff --git a/tests/auto/declarative_core/backend/routing/tst_routing.qml b/tests/auto/declarative_core/backend/routing/tst_routing.qml
new file mode 100644
index 00000000..4063a8ff
--- /dev/null
+++ b/tests/auto/declarative_core/backend/routing/tst_routing.qml
@@ -0,0 +1,163 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtTest 1.0
+import QtLocation 5.0
+
+Item {
+ id: root
+
+ property Fixture fixture: Qt.createQmlObject('Fixture {}', root)
+
+ Coordinate {
+ id: germanyBerlinChausseestr98
+ latitude: 52.53407
+ longitude: 13.37861
+ }
+ Coordinate {
+ id: germanyBerlinInvalidenstr117
+ latitude: 52.531049
+ longitude: 13.385008
+ }
+ Coordinate {
+ id: germanyBerlinTorstr76
+ latitude: 52.529193
+ longitude: 13.406822
+ }
+
+ Coordinate {
+ id: northSeaA
+ latitude: 56.452778
+ longitude: 3.74414
+ }
+
+ Coordinate {
+ id: northSeaB
+ latitude: 55.168829
+ longitude: 3.656249
+ }
+
+ Coordinate {
+ id: germanyMagdeburgUhlichstr6
+ latitude: 52.137289
+ longitude: 11.620986
+ }
+
+ Coordinate {
+ id: germanyLeipzigBurgstr8
+ latitude: 51.338323
+ longitude: 12.37306
+ }
+
+ Coordinate {
+ id: italyViaLuigiStembrini17
+ latitude: 45.481568
+ longitude: 9.205732
+ }
+
+ Coordinate {
+ id: franceMulhouse43RueDeGuebwiller
+ latitude: 47.744766
+ longitude: 7.322868
+ }
+
+ TestCase {
+ name: "Same city routing"
+
+ function test_two_waypoint_route() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinChausseestr98, germanyBerlinInvalidenstr117 ]
+ testData.expectedMinTravelTime = 30
+ testData.expectedMinDistance = 400
+
+ fixture.runTest(this, testData)
+ }
+
+ function test_three_waypoint_route() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinChausseestr98, germanyBerlinInvalidenstr117, germanyBerlinTorstr76 ]
+ testData.expectedMinTravelTime = 240
+ testData.expectedMinDistance = 2000
+
+ fixture.runTest(this, testData)
+ }
+ }
+
+ TestCase {
+ name: "Same country routing"
+
+ function test_two_waypoint_route() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinInvalidenstr117, germanyMagdeburgUhlichstr6 ]
+ testData.expectedMinTravelTime = 3600 + 30 * 60
+ testData.expectedMinDistance = 120000
+
+ fixture.runTest(this, testData)
+ }
+
+ function test_three_waypoint_route() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinInvalidenstr117, germanyMagdeburgUhlichstr6, germanyLeipzigBurgstr8 ]
+ testData.expectedMinTravelTime = 3600 * 2 + 40 * 60
+ testData.expectedMinDistance = 270000
+
+ fixture.runTest(this, testData)
+ }
+ }
+
+ TestCase {
+ name: "Cross country routing"
+
+ function test_across_the_alps() {
+ var testData = { }
+ testData.waypoints = [ franceMulhouse43RueDeGuebwiller, italyViaLuigiStembrini17 ]
+ testData.expectedMinTravelTime = 3600 * 3.5
+ testData.expectedMinDistance = 370000
+
+ fixture.runTest(this, testData)
+ }
+ }
+}
+
+
+
+
diff --git a/tests/auto/declarative_core/backend/routing/tst_routing_alternative_routes.qml b/tests/auto/declarative_core/backend/routing/tst_routing_alternative_routes.qml
new file mode 100644
index 00000000..e146e86f
--- /dev/null
+++ b/tests/auto/declarative_core/backend/routing/tst_routing_alternative_routes.qml
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtTest 1.0
+import QtLocation 5.0
+
+Item {
+ id: root
+
+ property Fixture fixture: Qt.createQmlObject('Fixture {}', root)
+
+
+
+ Coordinate {
+ id: germanyBerlinA
+ latitude: 52.5134576
+ longitude: 13.3932963
+ }
+
+ Coordinate {
+ id: germanyBerlinB
+ latitude: 52.5197881
+ longitude: 13.4336914
+ }
+
+
+ TestCase {
+ name: "Alternative routes"
+
+ function test_router_computes_alternative_route_for_the_given_set_of_optimizations() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinA, germanyBerlinB ]
+ testData.numberAlternativeRoutes = 1
+ testData.expectRoutes = 2
+ testData.routeOptimizations = RouteQuery.ShortestRoute | RouteQuery.FastestRoute
+ fixture.runTest(this, testData)
+ }
+
+ function test_router_computes_only_as_many_routes_as_there_are_optimizations() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinA, germanyBerlinB ]
+ testData.numberAlternativeRoutes = 5
+ testData.expectRoutes = 2
+ testData.routeOptimizations = RouteQuery.ShortestRoute | RouteQuery.FastestRoute
+ fixture.runTest(this, testData)
+ }
+
+ function test_can_use_alternative_routes_to_limit_number_of_routes_to_return() {
+ skip("Not supported by current router")
+ var testData = { }
+ testData.waypoints = [ germanyBerlinA, germanyBerlinB ]
+ testData.numberAlternativeRoutes = 0
+ testData.expectRoutes = 1
+ testData.routeOptimizations = RouteQuery.ShortestRoute | RouteQuery.FastestRoute
+ fixture.runTest(this, testData)
+ }
+
+ function test_can_use_alternative_routes_to_force_number_of_routes_regardless_of_travelmodes() {
+ skip("Not supported by current router")
+ var testData = { }
+ testData.waypoints = [ germanyBerlinA, germanyBerlinB ]
+ testData.numberAlternativeRoutes = 3
+ testData.expectRoutes = 4
+ testData.routeOptimizations = RouteQuery.FastestRoute
+ fixture.runTest(this, testData)
+ }
+
+ }
+
+}
+
+
+
+
diff --git a/tests/auto/declarative_core/backend/routing/tst_routing_excluded_areas.qml b/tests/auto/declarative_core/backend/routing/tst_routing_excluded_areas.qml
new file mode 100644
index 00000000..045d5df6
--- /dev/null
+++ b/tests/auto/declarative_core/backend/routing/tst_routing_excluded_areas.qml
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtTest 1.0
+import QtLocation 5.0
+
+Item {
+ id: root
+
+ property Fixture fixture: Qt.createQmlObject('Fixture {}', root)
+
+
+
+ BoundingBox {
+ id: germanyBerlinSiegessaeule
+ center: Coordinate {
+ latitude: 52.5143093
+ longitude: 13.3497963
+ }
+ width: 200
+ height: 200
+ }
+
+ BoundingBox {
+ id: germanyBerlinErnstReuterPlatz
+ center: Coordinate {
+ latitude: 52.512608
+ longitude: 13.321848
+ }
+ width: 200
+ height: 200
+ }
+
+ Coordinate {
+ id: germanyBerlinDorotheenstr100
+ latitude: 52.51792
+ longitude: 13.377862
+ }
+
+ Coordinate {
+ id: germanyBerlinBismarkstr19
+ latitude: 52.512246
+ longitude: 13.313481
+ }
+
+
+ TestCase {
+ name: "Excluded areas"
+
+ function test_router_computes_route_around_one_excluded_area() {
+ skip("Currenty not supported")
+ var testData = { }
+ testData.waypoints = [ germanyBerlinDorotheenstr100, germanyBerlinBismarkstr19 ]
+ testData.excludedAreas = [germanyBerlinSiegessaeule]
+ testData.noGrep = ["Sieges", "Stern"]
+ testData.grep = ["des 17. Juni", "Ernst-Reuter"]
+ fixture.runTest(this, testData)
+ }
+
+ function test_router_computes_route_around_several_excluded_area() {
+ skip("Currenty not supported")
+ var testData = { }
+ testData.waypoints = [ germanyBerlinDorotheenstr100, germanyBerlinBismarkstr19 ]
+ testData.excludedAreas = [germanyBerlinSiegessaeule, germanyBerlinErnstReuterPlatz]
+ testData.noGrep = ["Sieges", "Stern", "des 17. Juni", "Ernst-Reuter"]
+ fixture.runTest(this, testData)
+ }
+ }
+}
+
+
+
+
diff --git a/tests/auto/declarative_core/backend/routing/tst_routing_features.qml b/tests/auto/declarative_core/backend/routing/tst_routing_features.qml
new file mode 100644
index 00000000..12556415
--- /dev/null
+++ b/tests/auto/declarative_core/backend/routing/tst_routing_features.qml
@@ -0,0 +1,300 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtTest 1.0
+import QtLocation 5.0
+
+Item {
+ id: root
+
+ property Fixture fixture: Qt.createQmlObject('Fixture {}', root)
+
+
+ Coordinate {
+ id: denmarkRonneKrikestraede19
+ latitude: 55.098085
+ longitude: 14.698746
+ }
+
+ Coordinate {
+ id: germanySassnitzMrkranerStr9a
+ latitude: 54.511519
+ longitude: 13.610657
+ }
+
+ Coordinate {
+ id: germanyBerlinRungestr3
+ latitude: 52.512612
+ longitude: 13.413884
+ }
+
+ Coordinate {
+ id: germanyBerlinWallstr57
+ latitude: 52.513451
+ longitude: 13.413643
+ }
+
+ Coordinate {
+ id: germanyHamburgFinkenwerderStr
+ latitude: 53.515277
+ longitude: 9.919929
+ }
+
+ Coordinate {
+ id: germanyHamburgBeringStr
+ latitude: 53.556991
+ longitude: 9.900167
+ }
+
+ Coordinate {
+ id: germanyBerlinInvalidenstr54
+ latitude: 52.526269
+ longitude: 13.36822
+ }
+
+ Coordinate {
+ id: germanyBerlinHildebrandstrasse1
+ latitude: 52.509722
+ longitude: 13.360193
+ }
+
+ Coordinate {
+ id: germanyBerlinSpanndauerdamm89
+ latitude: 52.518683
+ longitude: 13.283677
+ }
+
+ Coordinate {
+ id: germanyBerlinJungfernheideweg80
+ latitude: 52.548582
+ longitude: 13.27042
+ }
+
+ Coordinate {
+ id: franceReims32RuedeMars
+ latitude: 49.259397
+ longitude: 4.0316
+ }
+
+ Coordinate {
+ id: franceLaon30RueStJean
+ latitude: 49.564549
+ longitude: 3.618283
+ }
+
+ Coordinate {
+ id: germanyBerlinInvalidenstr27
+ latitude: 52.531543
+ longitude: 13.387532
+ }
+
+ Coordinate {
+ id: germanyBerlinOranienburgerStr73
+ latitude: 52.524646
+ longitude: 13.394128
+ }
+
+
+ TestCase {
+ name: "Feature ferry"
+
+ function test_router_finds_route_with_ferry_enabled() {
+ var testData = { }
+ testData.waypoints = [ denmarkRonneKrikestraede19, germanySassnitzMrkranerStr9a ]
+ testData.segmentTolerance = 15
+ fixture.runTest(this, testData)
+ }
+
+ function test_router_doesnt_find_route_with_ferry_disabled() {
+ var testData = { }
+ testData.waypoints = [ denmarkRonneKrikestraede19, germanySassnitzMrkranerStr9a ]
+ testData.expectNoRouteFound = true
+ testData.weights = [ RouteQuery.FerryFeature, RouteQuery.DisallowFeatureWeight ]
+ fixture.runTest(this, testData)
+ }
+
+
+ }
+
+ TestCase {
+ name: "Feature tunnel"
+
+ function test_router_doesnt_use_tunnels_if_so_configured() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinInvalidenstr54, germanyBerlinHildebrandstrasse1 ]
+ testData.weights = [ RouteQuery.TunnelFeature, RouteQuery.DisallowFeatureWeight ]
+ testData.noGrep = ["tunnel"]
+ fixture.runTest(this, testData)
+ }
+
+ function test_router_avoids_tunnels_if_so_configured() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinInvalidenstr54, germanyBerlinHildebrandstrasse1 ]
+ testData.weights = [ RouteQuery.TunnelFeature, RouteQuery.AvoidFeatureWeight ]
+ testData.noGrep = ["tunnel"]
+ fixture.runTest(this, testData)
+ }
+
+ function test_router_prefers_tunnels_if_so_configured() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinInvalidenstr54, germanyBerlinHildebrandstrasse1 ]
+ testData.weights = [ RouteQuery.TunnelFeature, RouteQuery.PreferFeatureWeight ]
+ testData.grep = ["tunnel"]
+ fixture.runTest(this, testData)
+ }
+ }
+
+ TestCase {
+ name: "Feature highway"
+
+ function test_router_uses_the_autobahn() {
+ var testData = { }
+ testData.waypoints = [ germanyHamburgFinkenwerderStr, germanyHamburgBeringStr ]
+ testData.expectedMinTravelTime = 240
+ testData.expectedMinDistance = 6000
+ fixture.runTest(this, testData)
+ }
+
+ function test_router_doesnt_use_autobahn_if_highways_are_disabled() {
+ var testData = { }
+ testData.waypoints = [ germanyHamburgFinkenwerderStr, germanyHamburgBeringStr ]
+ testData.weights = [ RouteQuery.HighwayFeature, RouteQuery.DisallowFeatureWeight ]
+ testData.expectedMinDistance = 15000
+ fixture.runTest(this, testData)
+ }
+
+ function test_router_avoids_highways_if_so_configured() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinSpanndauerdamm89, germanyBerlinJungfernheideweg80 ]
+ testData.weights = [ RouteQuery.HighwayFeature, RouteQuery.AvoidFeatureWeight ]
+ testData.noGrep = ["111"]
+ fixture.runTest(this, testData)
+ }
+
+ function test_router_prefers_highways_if_so_configured() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinSpanndauerdamm89, germanyBerlinJungfernheideweg80 ]
+ testData.weights = [ RouteQuery.HighwayFeature, RouteQuery.PreferFeatureWeight ]
+ testData.grep = ["111"]
+ fixture.runTest(this, testData)
+ }
+ }
+
+ TestCase {
+ name: "Feature tollroad"
+
+ function test_router_doesnt_use_tollroad_if_so_configured() {
+ var testData = { }
+ testData.waypoints = [ franceReims32RuedeMars, franceLaon30RueStJean ]
+ testData.weights = [ RouteQuery.TollFeature, RouteQuery.DisallowFeatureWeight ]
+ testData.noGrep = ["A26"]
+ fixture.runTest(this, testData)
+ }
+
+ function test_router_avoids_highways_if_so_configured() {
+ var testData = { }
+ testData.waypoints = [ franceReims32RuedeMars, franceLaon30RueStJean ]
+ testData.weights = [ RouteQuery.TollFeature, RouteQuery.AvoidFeatureWeight ]
+ testData.noGrep = ["A26"]
+ fixture.runTest(this, testData)
+ }
+
+ function test_router_prefers_highways_if_so_configured() {
+ var testData = { }
+ testData.waypoints = [ franceReims32RuedeMars, franceLaon30RueStJean ]
+ testData.weights = [ RouteQuery.TollFeature, RouteQuery.PreferFeatureWeight ]
+ testData.grep = ["A26"]
+ fixture.runTest(this, testData)
+ }
+ }
+
+ TestCase {
+ name: "Feature dirt road"
+
+ function test_router_excludes_dirt_roads_if_so_configured() {
+ skip("No know testcase for dirt road")
+ var testData = { }
+ testData.waypoints = [ germanyBerlinInvalidenstr27, germanyBerlinOranienburgerStr73 ]
+ testData.weights = [ RouteQuery.DirtRoadFeature, RouteQuery.DisallowFeatureWeight ]
+ testData.travelModes = RouteQuery.CarTravel
+ fixture.runTest(this, testData)
+ }
+ }
+
+
+ TestCase {
+ name: "Unsupported features"
+
+ function test_router_doesnt_support_public_transport_feature() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinInvalidenstr27, germanyBerlinOranienburgerStr73 ]
+ testData.weights = [ RouteQuery.PublicTransitFeature, RouteQuery.PreferFeatureWeight ]
+ testData.travelModes = RouteQuery.PedestrianTravel
+ testData.grep = ["S1"]
+ testData.noGrep = ["Tor"]
+ testData.expectError = RouteModel.UnsupportedOptionError
+ fixture.runTest(this, testData)
+ }
+
+ function test_router_doesnt_support_park_feature() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinInvalidenstr27, germanyBerlinOranienburgerStr73 ]
+ testData.weights = [ RouteQuery.ParksFeature, RouteQuery.PreferFeatureWeight ]
+ testData.travelModes = RouteQuery.PedestrianTravel
+ testData.expectError = RouteModel.UnsupportedOptionError
+ fixture.runTest(this, testData)
+ }
+
+ function test_router_doesnt_support_motorpool_lane_feature() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinInvalidenstr27, germanyBerlinOranienburgerStr73 ]
+ testData.weights = [ RouteQuery.MotorPoolLaneFeature, RouteQuery.PreferFeatureWeight ]
+ testData.travelModes = RouteQuery.CarTravel
+ testData.expectError = RouteModel.UnsupportedOptionError
+ fixture.runTest(this, testData)
+ }
+ }
+}
+
+
+
+
diff --git a/tests/auto/declarative_core/backend/routing/tst_routing_localization.qml b/tests/auto/declarative_core/backend/routing/tst_routing_localization.qml
new file mode 100644
index 00000000..3b03e94c
--- /dev/null
+++ b/tests/auto/declarative_core/backend/routing/tst_routing_localization.qml
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtTest 1.0
+import QtLocation 5.0
+
+Item {
+ id: root
+
+ property Fixture fixture: Qt.createQmlObject('Fixture {}', root)
+
+ Coordinate {
+ id: germanyBerlinDorotheenstr100
+ latitude: 52.51792
+ longitude: 13.377862
+ }
+
+ Coordinate {
+ id: germanyBerlinBismarkstr19
+ latitude: 52.512246
+ longitude: 13.313481
+ }
+
+ TestCase {
+ name: "Localisation"
+
+ function test_loca_for_us_english() {
+ var testData = { }
+ testData.locale = "en_US"
+ testData.waypoints = [ germanyBerlinDorotheenstr100, germanyBerlinBismarkstr19 ]
+ testData.grep = ["miles", "exit", "roundabout", "toward", "destination"]
+ //testData.printInstructions = true
+ fixture.runTest(this, testData)
+ }
+
+ function test_loca_for_german() {
+ var testData = { }
+ testData.locale = "de_DE"
+ testData.waypoints = [ germanyBerlinDorotheenstr100, germanyBerlinBismarkstr19 ]
+ testData.grep = ["km", "Ausfahrt", "Kreisverkehr", "Richtung", "Ziel"]
+ //testData.printInstructions = true
+ fixture.runTest(this, testData)
+ }
+
+ function test_loca_for_french() {
+ var testData = { }
+ testData.locale = "fr_FR"
+ testData.waypoints = [ germanyBerlinDorotheenstr100, germanyBerlinBismarkstr19 ]
+ testData.grep = ["km", "sortie", "rond-point", "vers", "destination"]
+ //testData.printInstructions = true
+ fixture.runTest(this, testData)
+ }
+ }
+}
+
diff --git a/tests/auto/declarative_core/backend/routing/tst_routing_no_route.qml b/tests/auto/declarative_core/backend/routing/tst_routing_no_route.qml
new file mode 100644
index 00000000..718b0716
--- /dev/null
+++ b/tests/auto/declarative_core/backend/routing/tst_routing_no_route.qml
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtTest 1.0
+import QtLocation 5.0
+
+Item {
+ id: root
+
+ property Fixture fixture: Qt.createQmlObject('Fixture {}', root)
+
+
+ Coordinate {
+ id: northSeaA
+ latitude: 56.452778
+ longitude: 3.74414
+ }
+
+ Coordinate {
+ id: northSeaB
+ latitude: 55.168829
+ longitude: 3.656249
+ }
+
+ Coordinate {
+ id: icelandReykjavikBollagata
+ latitude: 64.136845
+ longitude: -21.918838
+ }
+
+ Coordinate {
+ id: faroerIslandTorshavnGripsvegur
+ latitude: 62.013148
+ longitude: -6.769097
+ }
+
+
+ Coordinate {
+ id: canadaStJohnCaseySt82
+ latitude: 47.5587712
+ longitude: -52.7152346
+ }
+
+
+ TestCase {
+ name: "No route"
+
+ function test_no_route_within_the_north_sea() {
+ var testData = { }
+ testData.waypoints = [ northSeaA, northSeaB ]
+ testData.expectNoRouteFound = true
+ fixture.runTest(this, testData)
+ }
+
+ // NOTE North Sea to island / main land tests don't work because positions get snapped
+
+ function test_no_route_from_island_to_island() {
+ var testData = { }
+ testData.waypoints = [ faroerIslandTorshavnGripsvegur, canadaStJohnCaseySt82 ]
+ testData.expectNoRouteFound = true
+ fixture.runTest(this, testData)
+ }
+ }
+}
+
+
+
+
diff --git a/tests/auto/declarative_core/backend/routing/tst_routing_optimizations.qml b/tests/auto/declarative_core/backend/routing/tst_routing_optimizations.qml
new file mode 100644
index 00000000..3c260333
--- /dev/null
+++ b/tests/auto/declarative_core/backend/routing/tst_routing_optimizations.qml
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtTest 1.0
+import QtLocation 5.0
+
+Item {
+ id: root
+
+ property Fixture fixture: Qt.createQmlObject('Fixture {}', root)
+
+ Coordinate {
+ id: germanyBerlinInvalidenstr27
+ latitude: 52.531543
+ longitude: 13.387532
+ }
+
+ Coordinate {
+ id: germanyBerlinOranienburgerStr73
+ latitude: 52.524646
+ longitude: 13.394128
+ }
+
+ TestCase {
+ name: "Route Optimizations"
+
+ function test_optimizations_dont_fail_for_any_supported_travel_mode() {
+ var travelModes = fixture.supportTravelModes()
+ var optimizations = [RouteQuery.FastestRoute, RouteQuery.ShortestRoute, RouteQuery.MostEconomicRoute, RouteQuery.MostScenicRoute]
+
+ for (var m = 0; m < travelModes.length; ++m) {
+ for (var o = 0; o < optimizations.length; ++o) {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinInvalidenstr27, germanyBerlinOranienburgerStr73 ]
+ testData.travelModes = travelModes[m]
+ testData.routeOptimizations = optimizations[o]
+ testData.segmentTolerance = 50
+ fixture.runTest(this, testData)
+ }
+ }
+ }
+ }
+
+}
+
+
+
+
diff --git a/tests/auto/declarative_core/backend/routing/tst_routing_travelmode.qml b/tests/auto/declarative_core/backend/routing/tst_routing_travelmode.qml
new file mode 100644
index 00000000..615f3d1b
--- /dev/null
+++ b/tests/auto/declarative_core/backend/routing/tst_routing_travelmode.qml
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtTest 1.0
+import QtLocation 5.0
+
+Item {
+ id: root
+
+ property Fixture fixture: Qt.createQmlObject('Fixture {}', root)
+
+
+ Coordinate {
+ id: germanyBerlinInvalidenstr27
+ latitude: 52.531543
+ longitude: 13.387532
+ }
+
+ Coordinate {
+ id: germanyBerlinOranienburgerStr73
+ latitude: 52.524646
+ longitude: 13.394128
+ }
+
+ TestCase {
+ name: "Travel mode"
+
+ function test_router_finds_route_using_public_transport() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinInvalidenstr27, germanyBerlinOranienburgerStr73 ]
+ testData.travelModes = RouteQuery.PublicTransitTravel
+ testData.segmentTolerance = 50
+ testData.grep = ["Deutsche Bahn"] // should be S1 but this isnt the case for some routers
+ testData.noGrep = ["Friedrich", "Tor"]
+ //testData.printInstructions = true
+ fixture.runTest(this, testData)
+ }
+
+ function test_router_finds_route_using_car() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinInvalidenstr27, germanyBerlinOranienburgerStr73 ]
+ testData.travelModes = RouteQuery.CarTravel
+ testData.grep = ["Friedrich"]
+ testData.noGrep = ["Deutsche Bahn", "Tucholsky"]
+ fixture.runTest(this, testData)
+ }
+
+ function test_router_finds_route_using_pedestrian_travel_mode() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinInvalidenstr27, germanyBerlinOranienburgerStr73 ]
+ testData.travelModes = RouteQuery.PedestrianTravel
+ testData.segmentTolerance = 5
+ testData.grep = ["Tucholsky", "Tor"]
+ testData.noGrep = ["Deutsche Bahn", "Friedrich"]
+ fixture.runTest(this, testData)
+ }
+
+ function test_router_doesnt_support_truck_travelmode() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinInvalidenstr27, germanyBerlinOranienburgerStr73 ]
+ testData.travelModes = RouteQuery.TruckTravel
+ testData.expectError = RouteModel.UnsupportedOptionError
+ fixture.runTest(this, testData)
+ }
+
+ function test_router_doesnt_support_bike_travelmode() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinInvalidenstr27, germanyBerlinOranienburgerStr73 ]
+ testData.travelModes = RouteQuery.BicycleTravel
+ testData.expectError = RouteModel.UnsupportedOptionError
+ fixture.runTest(this, testData)
+ }
+ }
+}
+
+
+
+
diff --git a/tests/auto/declarative_core/backend/routing/tst_unsupported_setups.qml b/tests/auto/declarative_core/backend/routing/tst_unsupported_setups.qml
new file mode 100644
index 00000000..7e06f75f
--- /dev/null
+++ b/tests/auto/declarative_core/backend/routing/tst_unsupported_setups.qml
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtTest 1.0
+import QtLocation 5.0
+
+Item {
+ id: root
+
+ property Fixture fixture: Qt.createQmlObject('Fixture {}', root)
+
+
+ Coordinate {
+ id: germanyBerlinInvalidenstr27
+ latitude: 52.531543
+ longitude: 13.387532
+ }
+
+ Coordinate {
+ id: germanyBerlinOranienburgerStr73
+ latitude: 52.524646
+ longitude: 13.394128
+ }
+
+ Coordinate {
+ id: invalidCoordinate
+ }
+
+
+ TestCase {
+ name: "Invalid travel modes"
+
+ function test_no_travel_mode_results_in_error() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinInvalidenstr27, germanyBerlinOranienburgerStr73 ]
+ testData.travelModes = fixture.supportTravelModesBitset()
+ testData.expectError = RouteModel.UnsupportedOptionError
+ fixture.runTest(this, testData)
+ }
+
+ function test_multiple_travel_modes_result_in_error() {
+ var testData = { }
+ testData.waypoints = [ germanyBerlinInvalidenstr27, germanyBerlinOranienburgerStr73 ]
+ testData.travelModes = fixture.supportTravelModesBitset()
+ testData.expectError = RouteModel.UnsupportedOptionError
+ fixture.runTest(this, testData)
+ }
+ }
+}
+
+
+
+
diff --git a/tests/auto/declarative_core/declarative_core.pro b/tests/auto/declarative_core/declarative_core.pro
index 06d57a50..a67c238e 100644
--- a/tests/auto/declarative_core/declarative_core.pro
+++ b/tests/auto/declarative_core/declarative_core.pro
@@ -1,13 +1,3 @@
-# QML tests in this directory must not depend on an OpenGL context.
-# QML tests that do require an OpenGL context must go in ../declarative_ui.
-
-TEMPLATE = app
-TARGET = tst_declarative_core
-CONFIG += warn_on qmltestcase
-SOURCES += main.cpp
-
-QT += location quick
-
-OTHER_FILES = *.qml
-TESTDATA = $$OTHER_FILES
-
+TEMPLATE = subdirs
+SUBDIRS += frontend
+SUBDIRS += backend
diff --git a/tests/auto/declarative_core/frontend/frontend.pro b/tests/auto/declarative_core/frontend/frontend.pro
new file mode 100644
index 00000000..2cd8766d
--- /dev/null
+++ b/tests/auto/declarative_core/frontend/frontend.pro
@@ -0,0 +1,13 @@
+# QML tests in this directory must not depend on an OpenGL context.
+# QML tests that do require an OpenGL context must go in ../../declarative_ui.
+
+TEMPLATE = app
+TARGET = tst_frontend
+CONFIG += warn_on qmltestcase
+SOURCES += main.cpp
+
+QT += location quick
+
+OTHER_FILES = *.qml
+TESTDATA = $$OTHER_FILES
+
diff --git a/tests/auto/declarative_core/main.cpp b/tests/auto/declarative_core/frontend/main.cpp
index 9b504220..9b504220 100644
--- a/tests/auto/declarative_core/main.cpp
+++ b/tests/auto/declarative_core/frontend/main.cpp
diff --git a/tests/auto/declarative_core/tst_bounding_area.qml b/tests/auto/declarative_core/frontend/tst_bounding_area.qml
index 2c1a55af..2c1a55af 100644
--- a/tests/auto/declarative_core/tst_bounding_area.qml
+++ b/tests/auto/declarative_core/frontend/tst_bounding_area.qml
diff --git a/tests/auto/declarative_core/tst_category.qml b/tests/auto/declarative_core/frontend/tst_category.qml
index 99b1dec4..99b1dec4 100644
--- a/tests/auto/declarative_core/tst_category.qml
+++ b/tests/auto/declarative_core/frontend/tst_category.qml
diff --git a/tests/auto/declarative_core/tst_categorymodel.qml b/tests/auto/declarative_core/frontend/tst_categorymodel.qml
index c1d2d37e..c1d2d37e 100644
--- a/tests/auto/declarative_core/tst_categorymodel.qml
+++ b/tests/auto/declarative_core/frontend/tst_categorymodel.qml
diff --git a/tests/auto/declarative_core/tst_contactdetail.qml b/tests/auto/declarative_core/frontend/tst_contactdetail.qml
index 89b19071..89b19071 100644
--- a/tests/auto/declarative_core/tst_contactdetail.qml
+++ b/tests/auto/declarative_core/frontend/tst_contactdetail.qml
diff --git a/tests/auto/declarative_core/tst_coordinate.qml b/tests/auto/declarative_core/frontend/tst_coordinate.qml
index f79570af..f79570af 100644
--- a/tests/auto/declarative_core/tst_coordinate.qml
+++ b/tests/auto/declarative_core/frontend/tst_coordinate.qml
diff --git a/tests/auto/declarative_core/tst_editorialmodel.qml b/tests/auto/declarative_core/frontend/tst_editorialmodel.qml
index 0e3274d7..0e3274d7 100644
--- a/tests/auto/declarative_core/tst_editorialmodel.qml
+++ b/tests/auto/declarative_core/frontend/tst_editorialmodel.qml
diff --git a/tests/auto/declarative_core/tst_imagemodel.qml b/tests/auto/declarative_core/frontend/tst_imagemodel.qml
index b90899dd..b90899dd 100644
--- a/tests/auto/declarative_core/tst_imagemodel.qml
+++ b/tests/auto/declarative_core/frontend/tst_imagemodel.qml
diff --git a/tests/auto/declarative_core/tst_map_routing.qml b/tests/auto/declarative_core/frontend/tst_map_routing.qml
index 30230734..30230734 100644
--- a/tests/auto/declarative_core/tst_map_routing.qml
+++ b/tests/auto/declarative_core/frontend/tst_map_routing.qml
diff --git a/tests/auto/declarative_core/tst_place.qml b/tests/auto/declarative_core/frontend/tst_place.qml
index fb2423bf..fb2423bf 100644
--- a/tests/auto/declarative_core/tst_place.qml
+++ b/tests/auto/declarative_core/frontend/tst_place.qml
diff --git a/tests/auto/declarative_core/tst_placeicon.qml b/tests/auto/declarative_core/frontend/tst_placeicon.qml
index bb35d6e7..bb35d6e7 100644
--- a/tests/auto/declarative_core/tst_placeicon.qml
+++ b/tests/auto/declarative_core/frontend/tst_placeicon.qml
diff --git a/tests/auto/declarative_core/tst_placerecommendationmodel.qml b/tests/auto/declarative_core/frontend/tst_placerecommendationmodel.qml
index 5e87bc29..5e87bc29 100644
--- a/tests/auto/declarative_core/tst_placerecommendationmodel.qml
+++ b/tests/auto/declarative_core/frontend/tst_placerecommendationmodel.qml
diff --git a/tests/auto/declarative_core/tst_placesearchmodel.qml b/tests/auto/declarative_core/frontend/tst_placesearchmodel.qml
index 6b041d07..6b041d07 100644
--- a/tests/auto/declarative_core/tst_placesearchmodel.qml
+++ b/tests/auto/declarative_core/frontend/tst_placesearchmodel.qml
diff --git a/tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml b/tests/auto/declarative_core/frontend/tst_placesearchsuggestionmodel.qml
index 20c6cb75..20c6cb75 100644
--- a/tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml
+++ b/tests/auto/declarative_core/frontend/tst_placesearchsuggestionmodel.qml
diff --git a/tests/auto/declarative_core/tst_plugin.qml b/tests/auto/declarative_core/frontend/tst_plugin.qml
index 8f171a33..8f171a33 100644
--- a/tests/auto/declarative_core/tst_plugin.qml
+++ b/tests/auto/declarative_core/frontend/tst_plugin.qml
diff --git a/tests/auto/declarative_core/tst_ratings.qml b/tests/auto/declarative_core/frontend/tst_ratings.qml
index 50472b85..50472b85 100644
--- a/tests/auto/declarative_core/tst_ratings.qml
+++ b/tests/auto/declarative_core/frontend/tst_ratings.qml
diff --git a/tests/auto/declarative_core/tst_reviewmodel.qml b/tests/auto/declarative_core/frontend/tst_reviewmodel.qml
index 48d4e97b..48d4e97b 100644
--- a/tests/auto/declarative_core/tst_reviewmodel.qml
+++ b/tests/auto/declarative_core/frontend/tst_reviewmodel.qml
diff --git a/tests/auto/declarative_core/tst_supplier.qml b/tests/auto/declarative_core/frontend/tst_supplier.qml
index a312f9b5..a312f9b5 100644
--- a/tests/auto/declarative_core/tst_supplier.qml
+++ b/tests/auto/declarative_core/frontend/tst_supplier.qml
diff --git a/tests/auto/declarative_core/tst_user.qml b/tests/auto/declarative_core/frontend/tst_user.qml
index aecb3b89..aecb3b89 100644
--- a/tests/auto/declarative_core/tst_user.qml
+++ b/tests/auto/declarative_core/frontend/tst_user.qml