summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-02-20 16:52:00 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-02-20 16:52:00 +0100
commita0c48081516f8fd6adae16c57a4f851bb139e36d (patch)
tree04528b7ccd2191a17f36f59b1aaaa9804c8cec9a /tests
parenteb5dd31512b26d3240e2d07b29e976270f028297 (diff)
downloadkube-a0c48081516f8fd6adae16c57a4f851bb139e36d.tar.gz
kube-a0c48081516f8fd6adae16c57a4f851bb139e36d.zip
Normalize the component package structure
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt31
-rw-r--r--tests/kubetestrunner.cpp6
-rw-r--r--tests/tst_applicationstart.qml38
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 @@
1project(tests)
2
3cmake_minimum_required(VERSION 2.8.12)
4cmake_policy(SET CMP0063 NEW)
5
6include(CPack)
7include(FeatureSummary)
8find_package(PkgConfig)
9
10################# set KDE specific information #################
11
12find_package(ECM 0.0.8 REQUIRED NO_MODULE)
13
14# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
15set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
16
17include(KDEInstallDirs)
18include(KDECMakeSettings)
19include(KDECompilerSettings)
20
21find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui Widgets WebEngine QuickTest)
22
23set (QT_MIN_VERSION "5.6.0")
24
25# build testrunner
26add_executable(kubetestrunner kubetestrunner.cpp)
27qt5_use_modules(kubetestrunner Gui Quick Widgets WebEngine QuickTest)
28
29# tests
30add_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
3int 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
20import QtQuick 2.7
21import QtQuick.Controls 2.0
22import QtQuick.Window 2.1
23import QtTest 1.0
24import org.kube.components.mail 1.0 as KubeMail
25
26
27TestCase {
28 id: testCase
29 width: 400
30 height: 400
31 name: "ApplicationStart"
32
33 KubeMail.Mail {
34 }
35
36 function test_stuff() {
37 }
38}