diff options
author | jan Iversen <jani@apache.org> | 2018-08-11 21:23:56 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-14 07:12:41 -0700 |
commit | 98ab0062118788e8394f73464e3d5f1362608806 (patch) | |
tree | d7981b066092bb92d0fbb39319e10c733e327dd6 /tests | |
parent | b70e002728912ba88ae266ceef0645db35e15cc4 (diff) | |
download | subsurface-98ab0062118788e8394f73464e3d5f1362608806.tar.gz |
tests: add PartialPressureGas qml test cases
Add tst_qPrefPartialPressureGas qml file to test C++ qml connection
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tst_qPrefPartialPressureGas.qml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/tst_qPrefPartialPressureGas.qml b/tests/tst_qPrefPartialPressureGas.qml new file mode 100644 index 000000000..049ab2b93 --- /dev/null +++ b/tests/tst_qPrefPartialPressureGas.qml @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: GPL-2.0 +import QtQuick 2.6 +import QtTest 1.2 +import org.subsurfacedivelog.mobile 1.0 + +TestCase { + name: "qPrefPartialPressureGas" + + SsrfPartialPressureGasPrefs { + id: tst + } + + SsrfPrefs { + id: prefs + } + + function test_variables() { + var x1 = tst.phe = true + tst.phe = true + compare(tst.phe, true) + + var x2 = tst.phe_threshold = 21.2 + tst.phe_threshold = 21.2 + compare(tst.phe_threshold, 21.2) + + var x3 = tst.pn2 = true + tst.pn2 = true + compare(tst.pn2, true) + + var x4 = tst.pn2_threshold = 21.3 + tst.pn2_threshold = 21.3 + compare(tst.pn2_threshold, 21.3) + + var x5 = tst.po2 = true + tst.po2 = true + compare(tst.po2, true) + + var x6 = tst.po2_threshold_max = 21.4 + tst.po2_threshold_max = 21.4 + compare(tst.po2_threshold_max, 21.4) + + var x7 = tst.po2_threshold_min = 21.5 + tst.po2_threshold_min = 21.5 + compare(tst.po2_threshold_min, 21.5) + } +} |