mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
tests: add DiveComputer qml test cases
Add tst_qPrefDiveComputer qml file to test C++ qml connection Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
parent
87b00aea2b
commit
daf8921d6f
1 changed files with 39 additions and 0 deletions
39
tests/tst_qPrefDiveComputer.qml
Normal file
39
tests/tst_qPrefDiveComputer.qml
Normal file
|
@ -0,0 +1,39 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
import QtQuick 2.6
|
||||
import QtTest 1.2
|
||||
import org.subsurfacedivelog.mobile 1.0
|
||||
|
||||
TestCase {
|
||||
name: "qPrefDiveComputer"
|
||||
|
||||
SsrfDiveComputerPrefs {
|
||||
id: tst
|
||||
}
|
||||
|
||||
SsrfPrefs {
|
||||
id: prefs
|
||||
}
|
||||
|
||||
function test_variables() {
|
||||
var x1 = tst.device
|
||||
tst.device = "my device"
|
||||
compare(tst.device, "my device")
|
||||
|
||||
var x1 = tst.device_name
|
||||
tst.device_name = "my device name"
|
||||
compare(tst.device_name, "my device name")
|
||||
|
||||
var x1 = tst.download_mode
|
||||
tst.download_mode = 19
|
||||
compare(tst.download_mode, 19)
|
||||
|
||||
var x1 = tst.product
|
||||
tst.product = "my product"
|
||||
compare(tst.product, "my product")
|
||||
|
||||
var x1 = tst.vendor
|
||||
tst.vendor = "my vendor"
|
||||
compare(tst.vendor, "my vendor")
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue