aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-01 15:30:42 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-02 08:59:56 -0700
commitd6983391c636e183d2c0abedddd9052f81b435de (patch)
tree38821720ad6526a032995483d7a5e797dc20105b /tests
parentccfd14211a77e9f6c3832d81a150cdfd04b757c9 (diff)
downloadsubsurface-d6983391c636e183d2c0abedddd9052f81b435de.tar.gz
tests: add Units qml test cases
Add tst_qPrefUnits qml file to test C++ qml connection Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/tst_qPrefUnits.qml58
1 files changed, 58 insertions, 0 deletions
diff --git a/tests/tst_qPrefUnits.qml b/tests/tst_qPrefUnits.qml
new file mode 100644
index 000000000..2804d9cbb
--- /dev/null
+++ b/tests/tst_qPrefUnits.qml
@@ -0,0 +1,58 @@
+// SPDX-License-Identifier: GPL-2.0
+import QtQuick 2.6
+import QtTest 1.2
+import org.subsurfacedivelog.mobile 1.0
+
+TestCase {
+ name: "qPrefUnits"
+
+ SsrfUnitPrefs {
+ id: tst
+ }
+
+ SsrfPrefs {
+ id: prefs
+ }
+
+ function test_variables() {
+ var x1 = tst.coordinates_traditional
+ tst.coordinates_traditional = true
+ compare(tst.coordinates_traditional, true)
+
+ var x2 = tst.duration_units
+//TBD tst.duration_units = ??
+//TBD compare(tst.duration_units, ??)
+
+ var x3 = tst.length
+//TBD tst.=length = ??
+//TBD compare(tst.length, ??)
+
+ var x4 = tst.pressure
+//TBD tst.pressure = ??
+//TBD compare(tst.pressure, ??)
+
+ var x5 = tst.show_units_table
+ tst.show_units_table = true
+ compare(tst.show_units_table, true)
+
+ var x6 = tst.temperature
+//TBD tst.temperature = ??
+//TBD compare(tst.temperature, ??)
+
+ var x7 = tst.unit_system
+ tst.unit_system = "metric"
+ compare(tst.unit_system, "metric")
+
+ var x8 = tst.vertical_speed_time
+//TBD tst.vertical_speed_time = ??
+//TBD compare(tst.vertical_speed_time, ??)
+
+ var x9 = tst.volume
+//TBD tst.volume = ??
+//TBD compare(tst.volume, ??)
+
+ var x10 = tst.weight
+//TBD tst.weight = ??
+//TBD compare(tst.weight, ??)
+ }
+}