summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-06 18:45:32 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-12 11:30:19 -0700
commit612f1b478f785331504fc4a22c1546536d2f345f (patch)
tree40beb3c024bf17e88db8be9f353aab9fccdaccb2 /tests
parentc97bb239b2e13f48b50a68a022aa448cfe3252cb (diff)
downloadsubsurface-612f1b478f785331504fc4a22c1546536d2f345f.tar.gz
tests: add LocationService qml test cases
Add tst_qPrefLocationService qml file to test C++ qml connection Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/tst_qPrefLocationService.qml26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/tst_qPrefLocationService.qml b/tests/tst_qPrefLocationService.qml
new file mode 100644
index 000000000..f25be3b99
--- /dev/null
+++ b/tests/tst_qPrefLocationService.qml
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0
+import QtQuick 2.6
+import QtTest 1.2
+import org.subsurfacedivelog.mobile 1.0
+
+TestCase {
+ name: "qPrefLocationService"
+
+ SsrfLocationServicePrefs {
+ id: tst
+ }
+
+ SsrfPrefs {
+ id: prefs
+ }
+
+ function test_variables() {
+ var x1 = tst.distance_threshold
+ tst.distance_threshold = 123
+ compare(tst.distance_threshold , 123)
+
+ var x2 = tst.time_threshold
+ tst.time_threshold = 12
+ compare(tst.time_threshold , 12)
+ }
+}