diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-02-20 16:52:00 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-02-20 16:52:00 +0100 |
commit | a0c48081516f8fd6adae16c57a4f851bb139e36d (patch) | |
tree | 04528b7ccd2191a17f36f59b1aaaa9804c8cec9a /tests | |
parent | eb5dd31512b26d3240e2d07b29e976270f028297 (diff) | |
download | kube-a0c48081516f8fd6adae16c57a4f851bb139e36d.tar.gz kube-a0c48081516f8fd6adae16c57a4f851bb139e36d.zip |
Normalize the component package structure
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 31 | ||||
-rw-r--r-- | tests/kubetestrunner.cpp | 6 | ||||
-rw-r--r-- | tests/tst_applicationstart.qml | 38 |
3 files changed, 75 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 00000000..ac19eaaa --- /dev/null +++ b/tests/CMakeLists.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | project(tests) | ||
2 | |||
3 | cmake_minimum_required(VERSION 2.8.12) | ||
4 | cmake_policy(SET CMP0063 NEW) | ||
5 | |||
6 | include(CPack) | ||
7 | include(FeatureSummary) | ||
8 | find_package(PkgConfig) | ||
9 | |||
10 | ################# set KDE specific information ################# | ||
11 | |||
12 | find_package(ECM 0.0.8 REQUIRED NO_MODULE) | ||
13 | |||
14 | # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked | ||
15 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) | ||
16 | |||
17 | include(KDEInstallDirs) | ||
18 | include(KDECMakeSettings) | ||
19 | include(KDECompilerSettings) | ||
20 | |||
21 | find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui Widgets WebEngine QuickTest) | ||
22 | |||
23 | set (QT_MIN_VERSION "5.6.0") | ||
24 | |||
25 | # build testrunner | ||
26 | add_executable(kubetestrunner kubetestrunner.cpp) | ||
27 | qt5_use_modules(kubetestrunner Gui Quick Widgets WebEngine QuickTest) | ||
28 | |||
29 | # tests | ||
30 | add_test(NAME qmltests COMMAND kubetestrunner WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) | ||
31 | |||
diff --git a/tests/kubetestrunner.cpp b/tests/kubetestrunner.cpp new file mode 100644 index 00000000..c0bee01a --- /dev/null +++ b/tests/kubetestrunner.cpp | |||
@@ -0,0 +1,6 @@ | |||
1 | #include <QtQuickTest/quicktest.h> | ||
2 | |||
3 | int main(int argc, char **argv) | ||
4 | { | ||
5 | return quick_test_main(argc, argv, "example", 0); | ||
6 | } | ||
diff --git a/tests/tst_applicationstart.qml b/tests/tst_applicationstart.qml new file mode 100644 index 00000000..15809395 --- /dev/null +++ b/tests/tst_applicationstart.qml | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * Copyright 2017 Christian Mollekopf <mollekopf@kolabsys.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU Library General Public License as | ||
6 | * published by the Free Software Foundation; either version 2, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU Library General Public License for more details | ||
13 | * | ||
14 | * You should have received a copy of the GNU Library General Public | ||
15 | * License along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | import QtQuick 2.7 | ||
21 | import QtQuick.Controls 2.0 | ||
22 | import QtQuick.Window 2.1 | ||
23 | import QtTest 1.0 | ||
24 | import org.kube.components.mail 1.0 as KubeMail | ||
25 | |||
26 | |||
27 | TestCase { | ||
28 | id: testCase | ||
29 | width: 400 | ||
30 | height: 400 | ||
31 | name: "ApplicationStart" | ||
32 | |||
33 | KubeMail.Mail { | ||
34 | } | ||
35 | |||
36 | function test_stuff() { | ||
37 | } | ||
38 | } | ||