summaryrefslogtreecommitdiff
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/auto.pro3
-rw-r--r--tests/auto/declarative/declarative.pro12
-rw-r--r--tests/auto/declarative_core/declarative_core.pro12
-rw-r--r--tests/auto/declarative_core/main.cpp43
-rw-r--r--tests/auto/declarative_core/tst_bounding_area.qml (renamed from tests/auto/declarative/tst_bounding_area.qml)0
-rw-r--r--tests/auto/declarative_core/tst_category.qml87
-rw-r--r--tests/auto/declarative_core/tst_map_routing.qml (renamed from tests/auto/declarative/tst_map_routing.qml)0
-rw-r--r--tests/auto/declarative_core/tst_place.qml (renamed from tests/auto/declarative/tst_place.qml)0
-rw-r--r--tests/auto/declarative_core/tst_plugin.qml (renamed from tests/auto/declarative/tst_plugin.qml)0
-rw-r--r--tests/auto/declarative_ui/declarative_ui.pro12
-rw-r--r--tests/auto/declarative_ui/main.cpp (renamed from tests/auto/declarative/tst_qmlmapsandnav.cpp)2
-rw-r--r--tests/auto/declarative_ui/tst_map.qml (renamed from tests/auto/declarative/tst_map.qml)0
-rw-r--r--tests/auto/declarative_ui/tst_map_geocoding.qml (renamed from tests/auto/declarative/tst_map_geocoding.qml)0
-rw-r--r--tests/auto/declarative_ui/tst_map_itemview.qml (renamed from tests/auto/declarative/tst_map_itemview.qml)0
-rw-r--r--tests/auto/declarative_ui/tst_map_maptype.qml (renamed from tests/auto/declarative/tst_map_maptype.qml)0
-rw-r--r--tests/auto/declarative_ui/tst_map_mouse.qml (renamed from tests/auto/declarative/tst_map_mouse.qml)0
-rw-r--r--tests/auto/declarative_ui/tst_map_pinch_and_flick.qml (renamed from tests/auto/declarative/tst_map_pinch_and_flick.qml)0
17 files changed, 157 insertions, 14 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 8f23e753..b03e8010 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -30,7 +30,8 @@ SUBDIRS += geotestplugin \
qplacesearchrequest \
qplacesupplier \
qplacesearchresult \
- declarative \
+ declarative_core \
+ declarative_ui \
qmlinterface \
maptype
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
deleted file mode 100644
index 95d107e9..00000000
--- a/tests/auto/declarative/declarative.pro
+++ /dev/null
@@ -1,12 +0,0 @@
-TEMPLATE=app
-TARGET=tst_qmlmapsandnavtest
-CONFIG += warn_on qmltestcase
-SOURCES += tst_qmlmapsandnav.cpp
-
-QT += declarative location
-
-OTHER_FILES += *.qml
-
-#qml.path = $$DESTDIR
-#qml.files = *.qml
-#INSTALLS += qml
diff --git a/tests/auto/declarative_core/declarative_core.pro b/tests/auto/declarative_core/declarative_core.pro
new file mode 100644
index 00000000..b4ef7819
--- /dev/null
+++ b/tests/auto/declarative_core/declarative_core.pro
@@ -0,0 +1,12 @@
+# 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 += declarative location
+
+OTHER_FILES += *.qml
+
diff --git a/tests/auto/declarative_core/main.cpp b/tests/auto/declarative_core/main.cpp
new file mode 100644
index 00000000..e521b08a
--- /dev/null
+++ b/tests/auto/declarative_core/main.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** 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 <QtQuickTest/quicktest.h>
+QUICK_TEST_MAIN(declarative_core)
diff --git a/tests/auto/declarative/tst_bounding_area.qml b/tests/auto/declarative_core/tst_bounding_area.qml
index 03865950..03865950 100644
--- a/tests/auto/declarative/tst_bounding_area.qml
+++ b/tests/auto/declarative_core/tst_bounding_area.qml
diff --git a/tests/auto/declarative_core/tst_category.qml b/tests/auto/declarative_core/tst_category.qml
new file mode 100644
index 00000000..a87fdd96
--- /dev/null
+++ b/tests/auto/declarative_core/tst_category.qml
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** 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
+
+TestCase {
+ name: "Category"
+
+ Category { id: emptyCategory }
+
+ function test_empty() {
+ compare(emptyCategory.categoryId, "");
+ compare(emptyCategory.name, "");
+ compare(emptyCategory.visibility, Category.UnspecifiedVisibility);
+ }
+
+ Category {
+ id: cat1
+ categoryId: "cat-id-1"
+ name: "Category 1"
+ visibility: Category.DeviceVisibility
+ }
+ Category {
+ id: cat2
+ categoryId: "cat-id-2"
+ name: "Category 2"
+ visibility: Category.PublicVisibility
+ }
+
+ function test_setAndGet() {
+ compare(cat1.categoryId, "cat-id-1");
+ compare(cat1.name, "Category 1");
+ compare(cat1.visibility, Category.DeviceVisibility);
+
+ verify(cat1.categoryId !== cat2.categoryId);
+ verify(cat1.name !== cat2.name);
+ verify(cat1.visibility !== cat2.visibility);
+
+ cat2.categoryId = "cat-id-1";
+ cat2.name = "Category 1";
+ cat2.visibility = Category.DeviceVisibility;
+
+ compare(cat1.categoryId, cat2.categoryId);
+ compare(cat1.name, cat2.name);
+ compare(cat1.visibility, cat2.visibility);
+ }
+}
diff --git a/tests/auto/declarative/tst_map_routing.qml b/tests/auto/declarative_core/tst_map_routing.qml
index af424e0b..af424e0b 100644
--- a/tests/auto/declarative/tst_map_routing.qml
+++ b/tests/auto/declarative_core/tst_map_routing.qml
diff --git a/tests/auto/declarative/tst_place.qml b/tests/auto/declarative_core/tst_place.qml
index 206bbb5e..206bbb5e 100644
--- a/tests/auto/declarative/tst_place.qml
+++ b/tests/auto/declarative_core/tst_place.qml
diff --git a/tests/auto/declarative/tst_plugin.qml b/tests/auto/declarative_core/tst_plugin.qml
index c357b9fb..c357b9fb 100644
--- a/tests/auto/declarative/tst_plugin.qml
+++ b/tests/auto/declarative_core/tst_plugin.qml
diff --git a/tests/auto/declarative_ui/declarative_ui.pro b/tests/auto/declarative_ui/declarative_ui.pro
new file mode 100644
index 00000000..77e212e2
--- /dev/null
+++ b/tests/auto/declarative_ui/declarative_ui.pro
@@ -0,0 +1,12 @@
+# QML tests in this directory depend on a Qt platform plugin that supports OpenGL.
+# QML tests that do not require an OpenGL context should go in ../declarative_core.
+
+TEMPLATE = app
+TARGET = tst_declarative_ui
+!no_ui_tests:CONFIG += warn_on qmltestcase
+SOURCES += main.cpp
+
+QT += declarative location
+
+OTHER_FILES += *.qml
+
diff --git a/tests/auto/declarative/tst_qmlmapsandnav.cpp b/tests/auto/declarative_ui/main.cpp
index 99269ee1..a68e203e 100644
--- a/tests/auto/declarative/tst_qmlmapsandnav.cpp
+++ b/tests/auto/declarative_ui/main.cpp
@@ -40,4 +40,4 @@
****************************************************************************/
#include <QtQuickTest/quicktest.h>
-QUICK_TEST_MAIN(qmlmapsandnav)
+QUICK_TEST_MAIN(declarative_ui)
diff --git a/tests/auto/declarative/tst_map.qml b/tests/auto/declarative_ui/tst_map.qml
index 1508474e..1508474e 100644
--- a/tests/auto/declarative/tst_map.qml
+++ b/tests/auto/declarative_ui/tst_map.qml
diff --git a/tests/auto/declarative/tst_map_geocoding.qml b/tests/auto/declarative_ui/tst_map_geocoding.qml
index 75547f71..75547f71 100644
--- a/tests/auto/declarative/tst_map_geocoding.qml
+++ b/tests/auto/declarative_ui/tst_map_geocoding.qml
diff --git a/tests/auto/declarative/tst_map_itemview.qml b/tests/auto/declarative_ui/tst_map_itemview.qml
index f2084279..f2084279 100644
--- a/tests/auto/declarative/tst_map_itemview.qml
+++ b/tests/auto/declarative_ui/tst_map_itemview.qml
diff --git a/tests/auto/declarative/tst_map_maptype.qml b/tests/auto/declarative_ui/tst_map_maptype.qml
index c18d2f2d..c18d2f2d 100644
--- a/tests/auto/declarative/tst_map_maptype.qml
+++ b/tests/auto/declarative_ui/tst_map_maptype.qml
diff --git a/tests/auto/declarative/tst_map_mouse.qml b/tests/auto/declarative_ui/tst_map_mouse.qml
index 62847940..62847940 100644
--- a/tests/auto/declarative/tst_map_mouse.qml
+++ b/tests/auto/declarative_ui/tst_map_mouse.qml
diff --git a/tests/auto/declarative/tst_map_pinch_and_flick.qml b/tests/auto/declarative_ui/tst_map_pinch_and_flick.qml
index 5738bee1..5738bee1 100644
--- a/tests/auto/declarative/tst_map_pinch_and_flick.qml
+++ b/tests/auto/declarative_ui/tst_map_pinch_and_flick.qml