diff options
author | jan Iversen <jani@apache.org> | 2018-08-28 12:33:47 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-09-11 17:25:00 -0700 |
commit | 848d2779519b365ba3cfd17838680f5b0cf6eb32 (patch) | |
tree | 6a6de26e370994fd018b37591a223b36dfd2f122 /tests/tst_qPrefUnits.qml | |
parent | c01d9f60c14ec9ee58892504e9f5c346dbb24e7e (diff) | |
download | subsurface-848d2779519b365ba3cfd17838680f5b0cf6eb32.tar.gz |
tests: add signal test to call tst_qPref*qml
Add signal testing of all variables
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'tests/tst_qPrefUnits.qml')
-rw-r--r-- | tests/tst_qPrefUnits.qml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/tst_qPrefUnits.qml b/tests/tst_qPrefUnits.qml index 22ae14a19..88bee3076 100644 --- a/tests/tst_qPrefUnits.qml +++ b/tests/tst_qPrefUnits.qml @@ -46,4 +46,29 @@ TestCase { //TBD PrefUnits.weight = ?? //TBD compare(PrefUnits.weight, ??) } + + Item { + id: spyCatcher + + property bool spy1 : false + property bool spy5 : false + property bool spy7 : false + + Connections { + target: PrefUnits + onCoordinates_traditionalChanged: {spyCatcher.spy1 = true } + onShow_units_tableChanged: {spyCatcher.spy5 = true } + onUnit_systemChanged: {spyCatcher.spy7 = true } + } + } + + function test_signals() { + PrefUnits.coordinates_traditional = ! PrefUnits.coordinates_traditional + PrefUnits.show_units_table = ! PrefUnits.show_units_table + PrefUnits.unit_system = "qml" + + compare(spyCatcher.spy1, true) + compare(spyCatcher.spy5, true) + compare(spyCatcher.spy7, true) + } } |