summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-05-22 10:08:18 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-05-23 08:33:29 +0000
commit50f41a6ed03d8a24a14d4a05fe9d25ff6f05e49b (patch)
tree10846b4e3fea2abf5eea8ef9152fc4deb905e0c1
parent929c9a46aaa75ec3c77a226eb9e8a2e956e4763c (diff)
downloadqtlocation-50f41a6ed03d8a24a14d4a05fe9d25ff6f05e49b.tar.gz
Reanimate tests/auto/qmlinterface.
Add CONFIG += testcase to tst_qmlinterface.cpp. Use QVERIFY2 to show QML load errors. Fix failures. Before this change, the test was not executed at all because "make check" was an empty target due to missing CONFIG += testcase. Change-Id: I6aa839fdbbbee6bdf316cbb5050fe5a5b53c12cd Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
-rw-r--r--tests/auto/qmlinterface/data/TestAddress.qml2
-rw-r--r--tests/auto/qmlinterface/data/TestLocation.qml23
-rw-r--r--tests/auto/qmlinterface/data/TestPlace.qml2
-rw-r--r--tests/auto/qmlinterface/qmlinterface.pro2
-rw-r--r--tests/auto/qmlinterface/tst_qmlinterface.cpp20
5 files changed, 25 insertions, 24 deletions
diff --git a/tests/auto/qmlinterface/data/TestAddress.qml b/tests/auto/qmlinterface/data/TestAddress.qml
index 4a214ed1..902a262c 100644
--- a/tests/auto/qmlinterface/data/TestAddress.qml
+++ b/tests/auto/qmlinterface/data/TestAddress.qml
@@ -31,7 +31,7 @@
**
****************************************************************************/
-import QtLocation 5.3
+import QtPositioning 5.5
Address {
city: "Brisbane"
diff --git a/tests/auto/qmlinterface/data/TestLocation.qml b/tests/auto/qmlinterface/data/TestLocation.qml
index d160eb7c..3b78364b 100644
--- a/tests/auto/qmlinterface/data/TestLocation.qml
+++ b/tests/auto/qmlinterface/data/TestLocation.qml
@@ -31,20 +31,21 @@
**
****************************************************************************/
-import QtLocation 5.3
+import QtPositioning 5.5
Location {
address: TestAddress { }
- boundingBox {
- center {
- longitude: 10.0
- latitude: 20.0
- altitude: 30.0
- }
- height: 30.0
- width: 40.0
- }
-
+// TODO:unsupported syntax for now
+// boundingBox {
+// center {
+// longitude: 10.0
+// latitude: 20.0
+// altitude: 30.0
+// }
+// height: 30.0
+// width: 40.0
+// }
+ boundingBox : QtPositioning.rectangle(QtPositioning.coordinate(20,10, 30),40.0,30)
coordinate {
longitude: 10.0
latitude: 20.0
diff --git a/tests/auto/qmlinterface/data/TestPlace.qml b/tests/auto/qmlinterface/data/TestPlace.qml
index f7d69248..33e54104 100644
--- a/tests/auto/qmlinterface/data/TestPlace.qml
+++ b/tests/auto/qmlinterface/data/TestPlace.qml
@@ -31,7 +31,7 @@
**
****************************************************************************/
-import QtLocation 5.3
+import QtLocation 5.5
Place {
name: "Test Place"
diff --git a/tests/auto/qmlinterface/qmlinterface.pro b/tests/auto/qmlinterface/qmlinterface.pro
index 8dbd9bbe..882ef737 100644
--- a/tests/auto/qmlinterface/qmlinterface.pro
+++ b/tests/auto/qmlinterface/qmlinterface.pro
@@ -9,7 +9,7 @@ QT += location qml testlib
#QT -= gui
TARGET = tst_qmlinterface
-CONFIG += console
+CONFIG += testcase
CONFIG -= app_bundle
TEMPLATE = app
diff --git a/tests/auto/qmlinterface/tst_qmlinterface.cpp b/tests/auto/qmlinterface/tst_qmlinterface.cpp
index 6f64302f..7282351f 100644
--- a/tests/auto/qmlinterface/tst_qmlinterface.cpp
+++ b/tests/auto/qmlinterface/tst_qmlinterface.cpp
@@ -153,7 +153,7 @@ void tst_qmlinterface::testAddress()
{
QQmlEngine engine;
QQmlComponent component(&engine, SRCDIR "data/TestAddress.qml");
- QVERIFY(component.isReady());
+ QVERIFY2(component.isReady(), qPrintable(component.errorString()));
QObject *qmlObject = component.create();
QGeoAddress address = qmlObject->property("address").value<QGeoAddress>();
@@ -176,7 +176,7 @@ void tst_qmlinterface::testLocation()
{
QQmlEngine engine;
QQmlComponent component(&engine, SRCDIR "data/TestLocation.qml");
- QVERIFY(component.isReady());
+ QVERIFY2(component.isReady(), qPrintable(component.errorString()));
QObject *qmlObject = component.create();
QGeoLocation location = qmlObject->property("location").value<QGeoLocation>();
@@ -196,7 +196,7 @@ void tst_qmlinterface::testCategory()
{
QQmlEngine engine;
QQmlComponent component(&engine, SRCDIR "data/TestCategory.qml");
- QVERIFY(component.isReady());
+ QVERIFY2(component.isReady(), qPrintable(component.errorString()));
QObject *qmlObject = component.create();
QPlaceCategory category = qmlObject->property("category").value<QPlaceCategory>();
@@ -215,7 +215,7 @@ void tst_qmlinterface::testIcon()
{
QQmlEngine engine;
QQmlComponent component(&engine, SRCDIR "data/TestIcon.qml");
- QVERIFY(component.isReady());
+ QVERIFY2(component.isReady(), qPrintable(component.errorString()));
QObject *qmlObject = component.create();
QPlaceIcon icon = qmlObject->property("icon").value<QPlaceIcon>();
@@ -233,7 +233,7 @@ void tst_qmlinterface::testRatings()
{
QQmlEngine engine;
QQmlComponent component(&engine, SRCDIR "data/TestRatings.qml");
- QVERIFY(component.isReady());
+ QVERIFY2(component.isReady(), qPrintable(component.errorString()));
QObject *qmlObject = component.create();
QPlaceRatings ratings = qmlObject->property("ratings").value<QPlaceRatings>();
@@ -253,7 +253,7 @@ void tst_qmlinterface::testSupplier()
{
QQmlEngine engine;
QQmlComponent component(&engine, SRCDIR "data/TestSupplier.qml");
- QVERIFY(component.isReady());
+ QVERIFY2(component.isReady(), qPrintable(component.errorString()));
QObject *qmlObject = component.create();
QPlaceSupplier supplier = qmlObject->property("supplier").value<QPlaceSupplier>();
@@ -274,7 +274,7 @@ void tst_qmlinterface::testUser()
{
QQmlEngine engine;
QQmlComponent component(&engine, SRCDIR "data/TestUser.qml");
- QVERIFY(component.isReady());
+ QVERIFY2(component.isReady(), qPrintable(component.errorString()));
QObject *qmlObject = component.create();
QPlaceUser user = qmlObject->property("user").value<QPlaceUser>();
@@ -293,7 +293,7 @@ void tst_qmlinterface::testPlaceAttribute()
{
QQmlEngine engine;
QQmlComponent component(&engine, SRCDIR "data/TestPlaceAttribute.qml");
- QVERIFY(component.isReady());
+ QVERIFY2(component.isReady(), qPrintable(component.errorString()));
QObject *qmlObject = component.create();
QPlaceAttribute placeAttribute = qmlObject->property("attribute").value<QPlaceAttribute>();
@@ -312,7 +312,7 @@ void tst_qmlinterface::testContactDetail()
{
QQmlEngine engine;
QQmlComponent component(&engine, SRCDIR "data/TestContactDetail.qml");
- QVERIFY(component.isReady());
+ QVERIFY2(component.isReady(), qPrintable(component.errorString()));
QObject *qmlObject = component.create();
QPlaceContactDetail contactDetail = qmlObject->property("contactDetail").value<QPlaceContactDetail>();
@@ -331,7 +331,7 @@ void tst_qmlinterface::testPlace()
{
QQmlEngine engine;
QQmlComponent component(&engine, SRCDIR "data/TestPlace.qml");
- QVERIFY(component.isReady());
+ QVERIFY2(component.isReady(), qPrintable(component.errorString()));
QObject *qmlObject = component.create();
QPlace place = qmlObject->property("place").value<QPlace>();