summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-09-07 13:53:00 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-11 17:25:00 -0700
commit1ee726597239db4e1fd66b5ad70983a127280414 (patch)
treec2f045b5c3acb385e2bd6d1625924e7e1f02cfce
parent684e334fb6098e604a91d140c1e2ea0883dff081 (diff)
downloadsubsurface-1ee726597239db4e1fd66b5ad70983a127280414.tar.gz
tests: update qml test cases
use new qml registration Signed-off-by: Jan Iversen <jani@apache.org>
-rw-r--r--tests/tst_qPref.qml9
-rw-r--r--tests/tst_qPrefCloudStorage.qml73
-rw-r--r--tests/tst_qPrefDisplay.qml137
-rw-r--r--tests/tst_qPrefDiveComputer.qml39
-rw-r--r--tests/tst_qPrefDivePlanner.qml159
-rw-r--r--tests/tst_qPrefFacebook.qml25
-rw-r--r--tests/tst_qPrefGeneral.qml87
-rw-r--r--tests/tst_qPrefGeocoding.qml23
-rw-r--r--tests/tst_qPrefLanguage.qml58
-rw-r--r--tests/tst_qPrefLocationService.qml21
-rw-r--r--tests/tst_qPrefPartialPressureGas.qml51
-rw-r--r--tests/tst_qPrefProxy.qml45
-rw-r--r--tests/tst_qPrefTechnicalDetails.qml171
-rw-r--r--tests/tst_qPrefUnits.qml69
-rw-r--r--tests/tst_qPrefUpdateManager.qml39
15 files changed, 448 insertions, 558 deletions
diff --git a/tests/tst_qPref.qml b/tests/tst_qPref.qml
index 99b798423..ed96ada3a 100644
--- a/tests/tst_qPref.qml
+++ b/tests/tst_qPref.qml
@@ -1,17 +1,12 @@
// SPDX-License-Identifier: GPL-2.0
import QtQuick 2.6
import QtTest 1.2
-import org.subsurfacedivelog.mobile 1.0
TestCase {
name: "qPref"
- SsrfPrefs {
- id: prefs
- }
-
function test_register() {
- var x = prefs.mobile_version
- compare(x, prefs.mobile_version)
+ var x = Pref.mobile_version
+ compare(x, Pref.mobile_version)
}
}
diff --git a/tests/tst_qPrefCloudStorage.qml b/tests/tst_qPrefCloudStorage.qml
index a48fa672d..8d58c7277 100644
--- a/tests/tst_qPrefCloudStorage.qml
+++ b/tests/tst_qPrefCloudStorage.qml
@@ -6,56 +6,49 @@ import org.subsurfacedivelog.mobile 1.0
TestCase {
name: "qPrefCloudStorage"
- SsrfCloudStoragePrefs {
- id: tst
- }
-
- SsrfPrefs {
- id: prefs
- }
-
function test_variables() {
- var x1 = tst.cloud_base_url
- tst.cloud_base_url = "my url"
- compare(tst.cloud_base_url, "my url")
+ var x1 = PrefCloudStorage.cloud_base_url
+ PrefCloudStorage.cloud_base_url = "my url"
+ compare(PrefCloudStorage.cloud_base_url, "my url")
- var x2 = tst.cloud_git_url
- compare(tst.cloud_git_url, "my url/git")
+ var x2 = PrefCloudStorage.cloud_git_url
+ compare(PrefCloudStorage.cloud_git_url, "my url/git")
- var x3 = tst.cloud_storage_email
- tst.cloud_storage_email = "my email"
- compare(tst.cloud_storage_email, "my email")
+ var x3 = PrefCloudStorage.cloud_storage_email
+ PrefCloudStorage.cloud_storage_email = "my email"
+ compare(PrefCloudStorage.cloud_storage_email, "my email")
- var x4 = tst.cloud_storage_email_encoded
- tst.cloud_storage_email_encoded= "my email enc"
- compare(tst.cloud_storage_email_encoded, "my email enc")
+ var x4 = PrefCloudStorage.cloud_storage_email_encoded
+ PrefCloudStorage.cloud_storage_email_encoded= "my email enc"
+ compare(PrefCloudStorage.cloud_storage_email_encoded, "my email enc")
- var x6 = tst.cloud_storage_password
- tst.cloud_storage_password = "my url"
- compare(tst.cloud_storage_password, "my url")
+ var x5 = PrefCloudStorage.cloud_storage_password
+ PrefCloudStorage.cloud_storage_password = "my url"
+ compare(PrefCloudStorage.cloud_storage_password, "my url")
- var x7 = tst.cloud_storage_pin
- tst.cloud_storage_pin= "my pin"
- compare(tst.cloud_storage_pin, "my pin")
+ var x6 = PrefCloudStorage.cloud_storage_pin
+ PrefCloudStorage.cloud_storage_pin= "my pin"
+ compare(PrefCloudStorage.cloud_storage_pin, "my pin")
- var x8 = tst.cloud_timeout
- tst.cloud_timeout = 137
- compare(tst.cloud_timeout, 137)
+ var x7 = PrefCloudStorage.cloud_timeout
+ PrefCloudStorage.cloud_timeout = 137
+ compare(PrefCloudStorage.cloud_timeout, 137)
- var x9 = tst.cloud_verification_status
- tst.cloud_verification_status = tst.CS_VERIFIED
- compare(tst.cloud_verification_status, tst.CS_VERIFIED)
+ var x8 = PrefCloudStorage.cloud_verification_status
+ PrefCloudStorage.cloud_verification_status = 1
+ PrefCloudStorage.cloud_verification_status = CloudStatus.CS_VERIFIED
+ compare(PrefCloudStorage.cloud_verification_status, CloudStatus.CS_VERIFIED)
- var x11 = tst.save_password_local
- tst.save_password_local = true
- compare(tst.save_password_local, true)
+ var x9 = PrefCloudStorage.save_password_local
+ PrefCloudStorage.save_password_local = true
+ compare(PrefCloudStorage.save_password_local, true)
- var x12 = tst.save_userid_local
- tst.save_userid_local = true
- compare(tst.save_userid_local, true)
+ var x10 = PrefCloudStorage.save_userid_local
+ PrefCloudStorage.save_userid_local = true
+ compare(PrefCloudStorage.save_userid_local, true)
- var x13 = tst.userid
- tst.userid = "my user"
- compare(tst.userid, "my user")
+ var x11 = PrefCloudStorage.userid
+ PrefCloudStorage.userid = "my user"
+ compare(PrefCloudStorage.userid, "my user")
}
}
diff --git a/tests/tst_qPrefDisplay.qml b/tests/tst_qPrefDisplay.qml
index e25f17bf8..f98aadf33 100644
--- a/tests/tst_qPrefDisplay.qml
+++ b/tests/tst_qPrefDisplay.qml
@@ -1,78 +1,79 @@
// SPDX-License-Identifier: GPL-2.0
import QtQuick 2.6
import QtTest 1.2
-import org.subsurfacedivelog.mobile 1.0
TestCase {
name: "qPrefDisplay"
- SsrfDisplayPrefs {
- id: display
- }
-
function test_variables() {
- var x0 = display.animation_speed
- display.animation_speed = 37
- compare(display.animation_speed, 37)
-
- var x1 = display.divelist_font
- display.divelist_font = "helvitica"
- compare(display.divelist_font, "helvitica")
-
- var x2 = display.font_size
- display.font_size = 12.0
- compare(display.font_size, 12.0)
-
- var x3 = display.display_invalid_dives
- display.display_invalid_dives = !x3
- compare(display.display_invalid_dives, !x3)
-
- var x4 = display.show_developer
- display.show_developer = !x4
- compare(display.show_developer, !x4)
-
- var x5 = display.theme
- display.theme = "myColor"
- compare(display.theme, "myColor")
-
-//TBD var x6 = display.tooltip_position
-//TBD display.tooltip_position = ??
-//TBD compare(display.tooltip_position, ??)
-
- var x7 = display.lastDir
- display.lastDir = "myDir"
- compare(display.lastDir, "myDir")
-
- var x8 = display.UserSurvey
- display.UserSurvey = "yes"
- compare(display.UserSurvey, "yes")
-
-//TBD var x9 = display.mainSplitter
-//TBD display.mainSplitter = ???
-//TBD compare(display.mainSplitter, ???)
-
-//TBD var x10 = display.topSplitter
-//TBD display.topSplitter = ???
-//TBD compare(display.topSplitter, ???)
-
-//TBD var x11 = display.bottomSplitter
-//TBD display.bottomSplitter = ???
-//TBD compare(display.bottomSplitter, ???)
-
- var x12 = display.maximized
- display.maximized = true
- compare(display.maximized, true)
-
-//TBD var x13 = display.geometry
-//TBD display.geometry = ???
-//TBD compare(display.geometry, ???)
-
-//TBD var x14 = display.windowState
-//TBD display.windowState = ???
-//TBD compare(display.windowState, ???)
-
- var x15 = display.lastState
- display.lastState = 17
- compare(display.lastState, 17)
+ var x1 = PrefDisplay.animation_speed
+ PrefDisplay.animation_speed = 37
+ compare(PrefDisplay.animation_speed, 37)
+
+ // PrefDisplay.divelist_font is NOT permitted in QML
+ // calling qApp->setFont in the setter crashes in Qt5.11
+ // due to a conflict with the QML font system
+// var x2 = PrefDisplay.divelist_font
+// PrefDisplay.divelist_font = "helvitica"
+// compare(PrefDisplay.divelist_font, "helvitica")
+
+ // PrefDisplay.font_size is NOT permitted in QML
+ // calling qApp->setFont in the setter crashes in Qt5.11
+ // due to a conflict with the QML font system
+// var x3 = PrefDisplay.font_size
+// PrefDisplay.font_size = 12.0
+// compare(PrefDisplay.font_size, 12.0)
+
+ var x4 = PrefDisplay.PrefDisplay_invalid_dives
+ PrefDisplay.PrefDisplay_invalid_dives = !x4
+ compare(PrefDisplay.PrefDisplay_invalid_dives, !x4)
+
+ var x5 = PrefDisplay.show_developer
+ PrefDisplay.show_developer = !x4
+ compare(PrefDisplay.show_developer, !x4)
+
+ var x6 = PrefDisplay.theme
+ PrefDisplay.theme = "myColor"
+ compare(PrefDisplay.theme, "myColor")
+
+//TBD var x7 = PrefDisplay.tooltip_position
+//TBD PrefDisplay.tooltip_position = ??
+//TBD compare(PrefDisplay.tooltip_position, ??)
+
+ var x8 = PrefDisplay.lastDir
+ PrefDisplay.lastDir = "myDir"
+ compare(PrefDisplay.lastDir, "myDir")
+
+ var x9 = PrefDisplay.UserSurvey
+ PrefDisplay.UserSurvey = "yes"
+ compare(PrefDisplay.UserSurvey, "yes")
+
+//TBD var x10 = PrefDisplay.mainSplitter
+//TBD PrefDisplay.mainSplitter = ???
+//TBD compare(PrefDisplay.mainSplitter, ???)
+
+//TBD var x11 = PrefDisplay.topSplitter
+//TBD PrefDisplay.topSplitter = ???
+//TBD compare(PrefDisplay.topSplitter, ???)
+
+//TBD var x12 = PrefDisplay.bottomSplitter
+//TBD PrefDisplay.bottomSplitter = ???
+//TBD compare(PrefDisplay.bottomSplitter, ???)
+
+ var x13 = PrefDisplay.maximized
+ PrefDisplay.maximized = true
+ compare(PrefDisplay.maximized, true)
+
+//TBD var x14 = PrefDisplay.geometry
+//TBD PrefDisplay.geometry = ???
+//TBD compare(PrefDisplay.geometry, ???)
+
+//TBD var x15 = PrefDisplay.windowState
+//TBD PrefDisplay.windowState = ???
+//TBD compare(PrefDisplay.windowState, ???)
+
+ var x16 = PrefDisplay.lastState
+ PrefDisplay.lastState = 17
+ compare(PrefDisplay.lastState, 17)
}
}
diff --git a/tests/tst_qPrefDiveComputer.qml b/tests/tst_qPrefDiveComputer.qml
index 4fe105f47..46ab96a2f 100644
--- a/tests/tst_qPrefDiveComputer.qml
+++ b/tests/tst_qPrefDiveComputer.qml
@@ -1,39 +1,30 @@
// 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 = PrefDiveComputer.device
+ PrefDiveComputer.device = "my device"
+ compare(PrefDiveComputer.device, "my device")
- var x1 = tst.device_name
- tst.device_name = "my device name"
- compare(tst.device_name, "my device name")
+ var x2 = PrefDiveComputer.device_name
+ PrefDiveComputer.device_name = "my device name"
+ compare(PrefDiveComputer.device_name, "my device name")
- var x1 = tst.download_mode
- tst.download_mode = 19
- compare(tst.download_mode, 19)
+ var x3 = PrefDiveComputer.download_mode
+ PrefDiveComputer.download_mode = 19
+ compare(PrefDiveComputer.download_mode, 19)
- var x1 = tst.product
- tst.product = "my product"
- compare(tst.product, "my product")
+ var x4 = PrefDiveComputer.product
+ PrefDiveComputer.product = "my product"
+ compare(PrefDiveComputer.product, "my product")
- var x1 = tst.vendor
- tst.vendor = "my vendor"
- compare(tst.vendor, "my vendor")
+ var x5 = PrefDiveComputer.vendor
+ PrefDiveComputer.vendor = "my vendor"
+ compare(PrefDiveComputer.vendor, "my vendor")
}
}
diff --git a/tests/tst_qPrefDivePlanner.qml b/tests/tst_qPrefDivePlanner.qml
index 5f0205bc1..7e0b70cbc 100644
--- a/tests/tst_qPrefDivePlanner.qml
+++ b/tests/tst_qPrefDivePlanner.qml
@@ -1,119 +1,110 @@
// SPDX-License-Identifier: GPL-2.0
import QtQuick 2.6
import QtTest 1.2
-import org.subsurfacedivelog.mobile 1.0
TestCase {
name: "qPrefDivePlanner"
- SsrfDivePlannerPrefs {
- id: tst
- }
-
- SsrfPrefs {
- id: prefs
- }
-
function test_variables() {
- var x1 = tst.ascratelast6m
- tst.ascratelast6m = 11
- compare(tst.ascratelast6m, 11)
+ var x1 = PrefDivePlanner.ascratelast6m
+ PrefDivePlanner.ascratelast6m = 11
+ compare(PrefDivePlanner.ascratelast6m, 11)
- var x2 = tst.ascratestops
- tst.ascratestops = 11
- compare(tst.ascratestops, 11)
+ var x2 = PrefDivePlanner.ascratestops
+ PrefDivePlanner.ascratestops = 11
+ compare(PrefDivePlanner.ascratestops, 11)
- var x3 = tst.ascrate50
- tst.ascrate50 = 12
- compare(tst.ascrate50, 12)
+ var x3 = PrefDivePlanner.ascrate50
+ PrefDivePlanner.ascrate50 = 12
+ compare(PrefDivePlanner.ascrate50, 12)
- var x4 = tst.ascrate75
- tst.ascrate75 = 13
- compare(tst.ascrate75, 13)
+ var x4 = PrefDivePlanner.ascrate75
+ PrefDivePlanner.ascrate75 = 13
+ compare(PrefDivePlanner.ascrate75, 13)
-//TBD var x5 = tst.bestmixend
-//TBD tst.bestmixend = 51
-//TBD compare(tst.bestmixend, 51)
+//TBD var x5 = PrefDivePlanner.bestmixend
+//TBD PrefDivePlanner.bestmixend = 51
+//TBD compare(PrefDivePlanner.bestmixend, 51)
- var x6 = tst.bottompo2
- tst.bottompo2 = 14
- compare(tst.bottompo2,14)
+ var x6 = PrefDivePlanner.bottompo2
+ PrefDivePlanner.bottompo2 = 14
+ compare(PrefDivePlanner.bottompo2,14)
- var x7 = tst.bottomsac
- tst.bottomsac = 15
- compare(tst.bottomsac, 15)
+ var x7 = PrefDivePlanner.bottomsac
+ PrefDivePlanner.bottomsac = 15
+ compare(PrefDivePlanner.bottomsac, 15)
- var x8 = tst.decopo2
- tst.decopo2 = 16
- compare(tst.decopo2, 16)
+ var x8 = PrefDivePlanner.decopo2
+ PrefDivePlanner.decopo2 = 16
+ compare(PrefDivePlanner.decopo2, 16)
- var x9 = tst.decosac
- tst.decosac = 17
- compare(tst.decosac, 17)
+ var x9 = PrefDivePlanner.decosac
+ PrefDivePlanner.decosac = 17
+ compare(PrefDivePlanner.decosac, 17)
- var x10 = tst.descrate
- tst.descrate = 18
- compare(tst.descrate, 18)
+ var x10 = PrefDivePlanner.descrate
+ PrefDivePlanner.descrate = 18
+ compare(PrefDivePlanner.descrate, 18)
- var x11 = tst.display_duration
- tst.display_duration = true
- compare(tst.display_duration, true)
+ var x11 = PrefDivePlanner.display_duration
+ PrefDivePlanner.display_duration = true
+ compare(PrefDivePlanner.display_duration, true)
- var x12 = tst.display_runtime
- tst.display_runtime = true
- compare(tst.display_runtime, true)
+ var x12 = PrefDivePlanner.display_runtime
+ PrefDivePlanner.display_runtime = true
+ compare(PrefDivePlanner.display_runtime, true)
- var x13 = tst.display_transitions
- tst.display_transitions = true
- compare(tst.display_transitions, true)
+ var x13 = PrefDivePlanner.display_transitions
+ PrefDivePlanner.display_transitions = true
+ compare(PrefDivePlanner.display_transitions, true)
- var x14 = tst.display_variations
- tst.display_variations = true
- compare(tst.display_variations, true)
+ var x14 = PrefDivePlanner.display_variations
+ PrefDivePlanner.display_variations = true
+ compare(PrefDivePlanner.display_variations, true)
- var x15 = tst.doo2breaks
- tst.doo2breaks = true
- compare(tst.doo2breaks, true)
+ var x15 = PrefDivePlanner.doo2breaks
+ PrefDivePlanner.doo2breaks = true
+ compare(PrefDivePlanner.doo2breaks, true)
- var x16 = tst.drop_stone_mode
- tst.drop_stone_mode = true
- compare(tst.drop_stone_mode, true)
+ var x16 = PrefDivePlanner.drop_stone_mode
+ PrefDivePlanner.drop_stone_mode = true
+ compare(PrefDivePlanner.drop_stone_mode, true)
- var x17 = tst.last_stop
- tst.last_stop = true
- compare(tst.last_stop, true)
+ var x17 = PrefDivePlanner.last_stop
+ PrefDivePlanner.last_stop = true
+ compare(PrefDivePlanner.last_stop, true)
- var x18 = tst.min_switch_duration
- tst.min_switch_duration = 19
- compare(tst.min_switch_duration, 19)
+ var x18 = PrefDivePlanner.min_switch_duration
+ PrefDivePlanner.min_switch_duration = 19
+ compare(PrefDivePlanner.min_switch_duration, 19)
-//TBD var x19 = tst.planner_deco_mode
-//TBD tst.planner_deco_mode = BUEHLMANN
-//TBD compare(tst.planner_deco_mode, BUEHLMANN)
+//TBD var x19 = PrefDivePlanner.planner_deco_mode
+//TBD PrefDivePlanner.planner_deco_mode = BUEHLMANN
+//TBD compare(PrefDivePlanner.planner_deco_mode, BUEHLMANN)
- var x20 = tst.problemsolvingtime
- tst.problemsolvingtime = 20
- compare(tst.problemsolvingtime, 20)
+ var x20 = PrefDivePlanner.problemsolvingtime
+ PrefDivePlanner.problemsolvingtime = 20
+ compare(PrefDivePlanner.problemsolvingtime, 20)
- var x21 = tst.reserve_gas
- tst.reserve_gas = 21
- compare(tst.reserve_gas, 21)
+ var x21 = PrefDivePlanner.reserve_gas
+ PrefDivePlanner.reserve_gas = 21
+ compare(PrefDivePlanner.reserve_gas, 21)
- var x22 = tst.sacfactor
- tst.sacfactor = 22
- compare(tst.sacfactor, 22)
+ var x22 = PrefDivePlanner.sacfactor
+ PrefDivePlanner.sacfactor = 22
+ compare(PrefDivePlanner.sacfactor, 22)
- var x23 = tst.safetystop
- tst.safetystop = true
- compare(tst.safetystop, true)
+ var x23 = PrefDivePlanner.safetystop
+ PrefDivePlanner.safetystop = true
+ compare(PrefDivePlanner.safetystop, true)
- var x24 = tst.switch_at_req_stop
- tst.switch_at_req_stop = true
- compare(tst.switch_at_req_stop, true)
+ var x24 = PrefDivePlanner.switch_at_req_stop
+ PrefDivePlanner.switch_at_req_stop = true
+ compare(PrefDivePlanner.switch_at_req_stop, true)
- var x25 = tst.verbatim_plan
- tst.verbatim_plan = true
- compare(tst.verbatim_plan, true)
+ var x25 = PrefDivePlanner.verbatim_plan
+ PrefDivePlanner.verbatim_plan = true
+ compare(PrefDivePlanner.verbatim_plan, true)
}
}
diff --git a/tests/tst_qPrefFacebook.qml b/tests/tst_qPrefFacebook.qml
index a56c6e685..721179772 100644
--- a/tests/tst_qPrefFacebook.qml
+++ b/tests/tst_qPrefFacebook.qml
@@ -1,24 +1,21 @@
// SPDX-License-Identifier: GPL-2.0
import QtQuick 2.6
import QtTest 1.2
-import org.subsurfacedivelog.mobile 1.0
TestCase {
name: "qPrefFacebook"
- SsrfFacebookPrefs {
- id: facebook
- }
-
function test_variables() {
- var x1 = facebook.access_token
- facebook.access_token = "my token"
- compare(facebook.access_token, "my token")
- var x2 = facebook.album_id
- facebook.album_id = "my album"
- compare(facebook.album_id, "my album")
- var x1 = facebook.user_id
- facebook.user_id = "my user"
- compare(facebook.user_id, "my user")
+ var x1 = PrefFacebook.access_token
+ PrefFacebook.access_token = "my token"
+ compare(PrefFacebook.access_token, "my token")
+
+ var x2 = PrefFacebook.album_id
+ PrefFacebook.album_id = "my album"
+ compare(PrefFacebook.album_id, "my album")
+
+ var x3 = PrefFacebook.user_id
+ PrefFacebook.user_id = "my user"
+ compare(PrefFacebook.user_id, "my user")
}
}
diff --git a/tests/tst_qPrefGeneral.qml b/tests/tst_qPrefGeneral.qml
index 5c1669056..c78ada6e9 100644
--- a/tests/tst_qPrefGeneral.qml
+++ b/tests/tst_qPrefGeneral.qml
@@ -1,70 +1,61 @@
// SPDX-License-Identifier: GPL-2.0
import QtQuick 2.6
import QtTest 1.2
-import org.subsurfacedivelog.mobile 1.0
TestCase {
name: "qPrefGeneral"
- SsrfGeneralPrefs {
- id: tst
- }
-
- SsrfPrefs {
- id: prefs
- }
-
function test_variables() {
- var x1 = tst.auto_recalculate_thumbnails
- tst.auto_recalculate_thumbnails = true
- compare(tst.auto_recalculate_thumbnails, true)
+ var x1 = PrefGeneral.auto_recalculate_thumbnails
+ PrefGeneral.auto_recalculate_thumbnails = true
+ compare(PrefGeneral.auto_recalculate_thumbnails, true)
- var x2 = tst.default_cylinder
- tst.default_cylinder = "my string"
- compare(tst.default_cylinder, "my string")
+ var x2 = PrefGeneral.default_cylinder
+ PrefGeneral.default_cylinder = "my string"
+ compare(PrefGeneral.default_cylinder, "my string")
- var x3 = tst.default_filename
- tst.default_filename = "my string"
- compare(tst.default_filename, "my string")
+ var x3 = PrefGeneral.default_filename
+ PrefGeneral.default_filename = "my string"
+ compare(PrefGeneral.default_filename, "my string")
-//TBD var x4 = tst.default_file_behavior
-//TBD tst.default_file_behavior = ??
-//TBD compare(tst.default_file_behavior, ??)
+//TBD var x4 = PrefGeneral.default_file_behavior
+//TBD PrefGeneral.default_file_behavior = ??
+//TBD compare(PrefGeneral.default_file_behavior, ??)
- var x5 = tst.defaultsetpoint
- tst.defaultsetpoint = 17
- compare(tst.defaultsetpoint, 17)
+ var x5 = PrefGeneral.defaultsetpoint
+ PrefGeneral.defaultsetpoint = 17
+ compare(PrefGeneral.defaultsetpoint, 17)
- var x6 = tst.extract_video_thumbnails
- tst.extract_video_thumbnails = true
- compare(tst.extract_video_thumbnails, true)
+ var x6 = PrefGeneral.extract_video_thumbnails
+ PrefGeneral.extract_video_thumbnails = true
+ compare(PrefGeneral.extract_video_thumbnails, true)
- var x7 = tst.extract_video_thumbnails_position
- tst.extract_video_thumbnails_position = 17
- compare(tst.extract_video_thumbnails_position, 17)
+ var x7 = PrefGeneral.extract_video_thumbnails_position
+ PrefGeneral.extract_video_thumbnails_position = 17
+ compare(PrefGeneral.extract_video_thumbnails_position, 17)
- var x8 = tst.ffmpeg_executable
- tst.ffmpeg_executable = "my string"
- compare(tst.ffmpeg_executable, "my string")
+ var x8 = PrefGeneral.ffmpeg_executable
+ PrefGeneral.ffmpeg_executable = "my string"
+ compare(PrefGeneral.ffmpeg_executable, "my string")
- var x9 = tst.o2consumption
- tst.o2consumption = 17
- compare(tst.o2consumption, 17)
+ var x9 = PrefGeneral.o2consumption
+ PrefGeneral.o2consumption = 17
+ compare(PrefGeneral.o2consumption, 17)
- var x10 = tst.pscr_ratio
- tst.pscr_ratio = 17
- compare(tst.pscr_ratio, 17)
+ var x10 = PrefGeneral.pscr_ratio
+ PrefGeneral.pscr_ratio = 17
+ compare(PrefGeneral.pscr_ratio, 17)
- var x11 = tst.use_default_file
- tst.use_default_file = true
- compare(tst.use_default_file, true)
+ var x11 = PrefGeneral.use_default_file
+ PrefGeneral.use_default_file = true
+ compare(PrefGeneral.use_default_file, true)
- var x12 = tst.diveshareExport_uid
- tst.diveshareExport_uid = "myUid"
- compare(tst.diveshareExport_uid, "myUid")
+ var x12 = PrefGeneral.diveshareExport_uid
+ PrefGeneral.diveshareExport_uid = "myUid"
+ compare(PrefGeneral.diveshareExport_uid, "myUid")
- var x13 = tst.diveshareExport_private
- tst.diveshareExport_private = true
- compare(tst.diveshareExport_private, true)
+ var x13 = PrefGeneral.diveshareExport_private
+ PrefGeneral.diveshareExport_private = true
+ compare(PrefGeneral.diveshareExport_private, true)
}
}
diff --git a/tests/tst_qPrefGeocoding.qml b/tests/tst_qPrefGeocoding.qml
index eb65bb7ed..f28eaba28 100644
--- a/tests/tst_qPrefGeocoding.qml
+++ b/tests/tst_qPrefGeocoding.qml
@@ -1,26 +1,21 @@
// SPDX-License-Identifier: GPL-2.0
import QtQuick 2.6
import QtTest 1.2
-import org.subsurfacedivelog.mobile 1.0
TestCase {
name: "qPrefGeocoding"
- SsrfGeocodingPrefs {
- id: geo
- }
-
function test_variables() {
-//TBD var x1 = geo.first_taxonomy_category
-//TBD geo.first_taxonomy_category = ??
-//TBD compare(geo.first_taxonom_categroy, ??)
+//TBD var x1 = PrefGeocoding.first_taxonomy_category
+//TBD PrefGeocoding.first_taxonomy_category = ??
+//TBD compare(PrefGeocoding.first_taxonom_categroy, ??)
-//TBD var x2 = geo.second_taxonomy_category
-//TBD geo.second_taxonomy_category = ??
-//TBD compare(geo.second_taxonom_categroy, ??)
+//TBD var x2 = PrefGeocoding.second_taxonomy_category
+//TBD PrefGeocoding.second_taxonomy_category = ??
+//TBD compare(PrefGeocoding.second_taxonom_categroy, ??)
-//TBD var x3 = geo.third_taxonomy_category
-//TBD geo.third_taxonomy_category = ??
-//TBD compare(geo.third_taxonom_categroy, ??)
+//TBD var x3 = PrefGeocoding.third_taxonomy_category
+//TBD PrefGeocoding.third_taxonomy_category = ??
+//TBD compare(PrefGeocoding.third_taxonom_categroy, ??)
}
}
diff --git a/tests/tst_qPrefLanguage.qml b/tests/tst_qPrefLanguage.qml
index efcc35534..023f6c5cd 100644
--- a/tests/tst_qPrefLanguage.qml
+++ b/tests/tst_qPrefLanguage.qml
@@ -1,50 +1,40 @@
// SPDX-License-Identifier: GPL-2.0
import QtQuick 2.6
import QtTest 1.2
-import org.subsurfacedivelog.mobile 1.0
-
TestCase {
name: "qPrefLanguage"
- SsrfLanguagePrefs {
- id: tst
- }
-
- SsrfPrefs {
- id: prefs
- }
-
function test_variables() {
- var x1 = tst.date_format
- tst.date_format = "new date format"
- compare(tst.date_format, "new date format")
+ var x1 = PrefLanguage.date_format
+ PrefLanguage.date_format = "new date format"
+ compare(PrefLanguage.date_format, "new date format")
- var x2 = tst.date_format_override
- tst.date_format_override = true
- compare(tst.date_format_override, true)
+ var x2 = PrefLanguage.date_format_override
+ PrefLanguage.date_format_override = true
+ compare(PrefLanguage.date_format_override, true)
- var x3 = tst.date_format_short
- tst.date_format_short = "new short format"
- compare(tst.date_format_short, "new short format")
+ var x3 = PrefLanguage.date_format_short
+ PrefLanguage.date_format_short = "new short format"
+ compare(PrefLanguage.date_format_short, "new short format")
- var x4 = tst.language
- tst.language = "new lang format"
- compare(tst.language, "new lang format")
+ var x4 = PrefLanguage.language
+ PrefLanguage.language = "new lang format"
+ compare(PrefLanguage.language, "new lang format")
- var x5 = tst.lang_locale
- tst.lang_locale = "new loc lang format"
- compare(tst.lang_locale, "new loc lang format")
+ var x5 = PrefLanguage.lang_locale
+ PrefLanguage.lang_locale = "new loc lang format"
+ compare(PrefLanguage.lang_locale, "new loc lang format")
- var x6 = tst.time_format
- tst.time_format = "new time format"
- compare(tst.time_format, "new time format")
+ var x6 = PrefLanguage.time_format
+ PrefLanguage.time_format = "new time format"
+ compare(PrefLanguage.time_format, "new time format")
- var x7 = tst.time_format_override
- tst.time_format_override = true
- compare(tst.time_format_override, true)
+ var x7 = PrefLanguage.time_format_override
+ PrefLanguage.time_format_override = true
+ compare(PrefLanguage.time_format_override, true)
- var x8 = tst.use_system_language
- tst.use_system_language = true
- compare(tst.use_system_language, true)
+ var x8 = PrefLanguage.use_system_language
+ PrefLanguage.use_system_language = true
+ compare(PrefLanguage.use_system_language, true)
}
}
diff --git a/tests/tst_qPrefLocationService.qml b/tests/tst_qPrefLocationService.qml
index f25be3b99..61cbc9827 100644
--- a/tests/tst_qPrefLocationService.qml
+++ b/tests/tst_qPrefLocationService.qml
@@ -1,26 +1,17 @@
// 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 x1 = PrefLocationService.distance_threshold
+ PrefLocationService.distance_threshold = 123
+ compare(PrefLocationService.distance_threshold , 123)
- var x2 = tst.time_threshold
- tst.time_threshold = 12
- compare(tst.time_threshold , 12)
+ var x2 = PrefLocationService.time_threshold
+ PrefLocationService.time_threshold = 12
+ compare(PrefLocationService.time_threshold , 12)
}
}
diff --git a/tests/tst_qPrefPartialPressureGas.qml b/tests/tst_qPrefPartialPressureGas.qml
index 049ab2b93..5000a3dae 100644
--- a/tests/tst_qPrefPartialPressureGas.qml
+++ b/tests/tst_qPrefPartialPressureGas.qml
@@ -1,46 +1,37 @@
// 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 x1 = PrefPartialPressureGas.phe = true
+ PrefPartialPressureGas.phe = true
+ compare(PrefPartialPressureGas.phe, true)
- var x2 = tst.phe_threshold = 21.2
- tst.phe_threshold = 21.2
- compare(tst.phe_threshold, 21.2)
+ var x2 = PrefPartialPressureGas.phe_threshold = 21.2
+ PrefPartialPressureGas.phe_threshold = 21.2
+ compare(PrefPartialPressureGas.phe_threshold, 21.2)
- var x3 = tst.pn2 = true
- tst.pn2 = true
- compare(tst.pn2, true)
+ var x3 = PrefPartialPressureGas.pn2 = true
+ PrefPartialPressureGas.pn2 = true
+ compare(PrefPartialPressureGas.pn2, true)
- var x4 = tst.pn2_threshold = 21.3
- tst.pn2_threshold = 21.3
- compare(tst.pn2_threshold, 21.3)
+ var x4 = PrefPartialPressureGas.pn2_threshold = 21.3
+ PrefPartialPressureGas.pn2_threshold = 21.3
+ compare(PrefPartialPressureGas.pn2_threshold, 21.3)
- var x5 = tst.po2 = true
- tst.po2 = true
- compare(tst.po2, true)
+ var x5 = PrefPartialPressureGas.po2 = true
+ PrefPartialPressureGas.po2 = true
+ compare(PrefPartialPressureGas.po2, true)
- var x6 = tst.po2_threshold_max = 21.4
- tst.po2_threshold_max = 21.4
- compare(tst.po2_threshold_max, 21.4)
+ var x6 = PrefPartialPressureGas.po2_threshold_max = 21.4
+ PrefPartialPressureGas.po2_threshold_max = 21.4
+ compare(PrefPartialPressureGas.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)
+ var x7 = PrefPartialPressureGas.po2_threshold_min = 21.5
+ PrefPartialPressureGas.po2_threshold_min = 21.5
+ compare(PrefPartialPressureGas.po2_threshold_min, 21.5)
}
}
diff --git a/tests/tst_qPrefProxy.qml b/tests/tst_qPrefProxy.qml
index 1cd84ca8f..a51a03881 100644
--- a/tests/tst_qPrefProxy.qml
+++ b/tests/tst_qPrefProxy.qml
@@ -1,42 +1,33 @@
// SPDX-License-Identifier: GPL-2.0
import QtQuick 2.6
import QtTest 1.2
-import org.subsurfacedivelog.mobile 1.0
TestCase {
name: "qPrefProxy"
- SsrfProxyPrefs {
- id: tst
- }
-
- SsrfPrefs {
- id: prefs
- }
-
function test_variables() {
- var x1 = tst.proxy_auth
- tst.proxy_auth = true
- compare(tst.proxy_auth, true)
+ var x1 = PrefProxy.proxy_auth
+ PrefProxy.proxy_auth = true
+ compare(PrefProxy.proxy_auth, true)
- var x2 = tst.proxy_host
- tst.proxy_host = "my host"
- compare(tst.proxy_host, "my host")
+ var x2 = PrefProxy.proxy_host
+ PrefProxy.proxy_host = "my host"
+ compare(PrefProxy.proxy_host, "my host")
- var x3 = tst.proxy_pass
- tst.proxy_pass = "my pass"
- compare(tst.proxy_pass, "my pass")
+ var x3 = PrefProxy.proxy_pass
+ PrefProxy.proxy_pass = "my pass"
+ compare(PrefProxy.proxy_pass, "my pass")
- var x3 = tst.proxy_port
- tst.proxy_port = 544
- compare(tst.proxy_port, 544)
+ var x4 = PrefProxy.proxy_port
+ PrefProxy.proxy_port = 544
+ compare(PrefProxy.proxy_port, 544)
- var x5 = tst.proxy_type
- tst.proxy_type = 3
- compare(tst.proxy_type, 3)
+ var x5 = PrefProxy.proxy_type
+ PrefProxy.proxy_type = 3
+ compare(PrefProxy.proxy_type, 3)
- var x3 = tst.proxy_user
- tst.proxy_user = "my user"
- compare(tst.proxy_user, "my user")
+ var x6 = PrefProxy.proxy_user
+ PrefProxy.proxy_user = "my user"
+ compare(PrefProxy.proxy_user, "my user")
}
}
diff --git a/tests/tst_qPrefTechnicalDetails.qml b/tests/tst_qPrefTechnicalDetails.qml
index 2b0bdd5ba..8dfd1719b 100644
--- a/tests/tst_qPrefTechnicalDetails.qml
+++ b/tests/tst_qPrefTechnicalDetails.qml
@@ -1,126 +1,117 @@
// SPDX-License-Identifier: GPL-2.0
import QtQuick 2.6
import QtTest 1.2
-import org.subsurfacedivelog.mobile 1.0
TestCase {
name: "qPrefTechnicalDetails"
- SsrfTechnicalDetailsPrefs {
- id: tst
- }
-
- SsrfPrefs {
- id: prefs
- }
-
function test_variables() {
- var x01 = tst.calcalltissues
- tst.calcalltissues = true
- compare(tst.calcalltissues, true)
+ var x01 = PrefTechnicalDetails.calcalltissues
+ PrefTechnicalDetails.calcalltissues = true
+ compare(PrefTechnicalDetails.calcalltissues, true)
- var x02 = tst.calcceiling
- tst.calcceiling = true
- compare(tst.calcceiling, true)
+ var x02 = PrefTechnicalDetails.calcceiling
+ PrefTechnicalDetails.calcceiling = true
+ compare(PrefTechnicalDetails.calcceiling, true)
- var x03 = tst.calcceiling3m
- tst.calcceiling3m = true
- compare(tst.calcceiling3m, true)
+ var x03 = PrefTechnicalDetails.calcceiling3m
+ PrefTechnicalDetails.calcceiling3m = true
+ compare(PrefTechnicalDetails.calcceiling3m, true)
- var x04 = tst.calcndltts
- tst.calcndltts = true
- compare(tst.calcndltts, true)
+ var x04 = PrefTechnicalDetails.calcndltts
+ PrefTechnicalDetails.calcndltts = true
+ compare(PrefTechnicalDetails.calcndltts, true)
- var x05 = tst.dcceiling
- tst.dcceiling = true
- compare(tst.dcceiling, true)
+ var x05 = PrefTechnicalDetails.dcceiling
+ PrefTechnicalDetails.dcceiling = true
+ compare(PrefTechnicalDetails.dcceiling, true)
-//TBD var x06 = tst.display_deco_mode
-//TBD tst.display_deco_mode = BUEHLMANN
-//TBD compare(tst.display_deco_mode, BUEHLMANN)
+//TBD var x06 = PrefTechnicalDetails.display_deco_mode
+//TBD PrefTechnicalDetails.display_deco_mode = BUEHLMANN
+//TBD compare(PrefTechnicalDetails.display_deco_mode, BUEHLMANN)
- var x07 = tst.display_unused_tanks
- tst.display_unused_tanks = true
- compare(tst.display_unused_tanks, true)
+ var x07 = PrefTechnicalDetails.display_unused_tanks
+ PrefTechnicalDetails.display_unused_tanks = true
+ compare(PrefTechnicalDetails.display_unused_tanks, true)
- var x08 = tst.ead
- tst.ead = true
- compare(tst.ead, true)
+ var x08 = PrefTechnicalDetails.ead
+ PrefTechnicalDetails.ead = true
+ compare(PrefTechnicalDetails.ead, true)
- var x09 = tst.gfhigh
- tst.gfhigh = 27
- compare(tst.gfhigh, 27)
+ var x09 = PrefTechnicalDetails.gfhigh
+ PrefTechnicalDetails.gfhigh = 27
+ compare(PrefTechnicalDetails.gfhigh, 27)
- var x10 = tst.gflow
- tst.gflow = 25
- compare(tst.gflow, 25)
+ var x10 = PrefTechnicalDetails.gflow
+ PrefTechnicalDetails.gflow = 25
+ compare(PrefTechnicalDetails.gflow, 25)
- var x11 = tst.gf_low_at_maxdepth
- tst.gf_low_at_maxdepth = true
- compare(tst.gf_low_at_maxdepth, true)
+ var x11 = PrefTechnicalDetails.gf_low_at_maxdepth
+ PrefTechnicalDetails.gf_low_at_maxdepth = true
+ compare(PrefTechnicalDetails.gf_low_at_maxdepth, true)
- var x12 = tst.hrgraph
- tst.hrgraph = true
- compare(tst.hrgraph, true)
+ var x12 = PrefTechnicalDetails.hrgraph
+ PrefTechnicalDetails.hrgraph = true
+ compare(PrefTechnicalDetails.hrgraph, true)
- var x13 = tst.mod
- tst.mod = true
- compare(tst.mod, true)
+ var x13 = PrefTechnicalDetails.mod
+ PrefTechnicalDetails.mod = true
+ compare(PrefTechnicalDetails.mod, true)
- var x14 = tst.modpO2 = 1.02;
- tst.modpO2 = 1.02
- compare(tst.modpO2, 1.02)
+ var x14 = PrefTechnicalDetails.modpO2 = 1.02;
+ PrefTechnicalDetails.modpO2 = 1.02
+ compare(PrefTechnicalDetails.modpO2, 1.02)
- var x15 = tst.percentagegraph
- tst.percentagegraph = true
- compare(tst.percentagegraph, true)
+ var x15 = PrefTechnicalDetails.percentagegraph
+ PrefTechnicalDetails.percentagegraph = true
+ compare(PrefTechnicalDetails.percentagegraph, true)
- var x16 = tst.redceiling
- tst.redceiling = true
- compare(tst.redceiling, true)
+ var x16 = PrefTechnicalDetails.redceiling
+ PrefTechnicalDetails.redceiling = true
+ compare(PrefTechnicalDetails.redceiling, true)
- var x17 = tst.rulergraph
- tst.rulergraph = true
- compare(tst.rulergraph, true)
+ var x17 = PrefTechnicalDetails.rulergraph
+ PrefTechnicalDetails.rulergraph = true
+ compare(PrefTechnicalDetails.rulergraph, true)
- var x18 = tst.show_average_depth
- tst.show_average_depth = true
- compare(tst.show_average_depth, true)
+ var x18 = PrefTechnicalDetails.show_average_depth
+ PrefTechnicalDetails.show_average_depth = true
+ compare(PrefTechnicalDetails.show_average_depth, true)
- var x19 = tst.show_ccr_sensors
- tst.show_ccr_sensors = true
- compare(tst.show_ccr_sensors, true)
+ var x19 = PrefTechnicalDetails.show_ccr_sensors
+ PrefTechnicalDetails.show_ccr_sensors = true
+ compare(PrefTechnicalDetails.show_ccr_sensors, true)
- var x20 = tst.show_ccr_setpoint
- tst.show_ccr_setpoint = true
- compare(tst.show_ccr_setpoint, true)
+ var x20 = PrefTechnicalDetails.show_ccr_setpoint
+ PrefTechnicalDetails.show_ccr_setpoint = true
+ compare(PrefTechnicalDetails.show_ccr_setpoint, true)
- var x21 = tst.show_icd
- tst.show_icd = true
- compare(tst.show_icd, true)
+ var x21 = PrefTechnicalDetails.show_icd
+ PrefTechnicalDetails.show_icd = true
+ compare(PrefTechnicalDetails.show_icd, true)
- var x22 = tst.show_pictures_in_profile
- tst.show_pictures_in_profile = true
- compare(tst.show_pictures_in_profile, true)
+ var x22 = PrefTechnicalDetails.show_pictures_in_profile
+ PrefTechnicalDetails.show_pictures_in_profile = true
+ compare(PrefTechnicalDetails.show_pictures_in_profile, true)
- var x23 = tst.show_sac
- tst.show_sac = true
- compare(tst.show_sac, true)
+ var x23 = PrefTechnicalDetails.show_sac
+ PrefTechnicalDetails.show_sac = true
+ compare(PrefTechnicalDetails.show_sac, true)
- var x24 = tst.show_scr_ocpo2
- tst.show_scr_ocpo2 = true
- compare(tst.show_scr_ocpo2, true)
+ var x24 = PrefTechnicalDetails.show_scr_ocpo2
+ PrefTechnicalDetails.show_scr_ocpo2 = true
+ compare(PrefTechnicalDetails.show_scr_ocpo2, true)
- var x25 = tst.tankbar
- tst.tankbar = true
- compare(tst.tankbar, true)
+ var x25 = PrefTechnicalDetails.tankbar
+ PrefTechnicalDetails.tankbar = true
+ compare(PrefTechnicalDetails.tankbar, true)
- var x26 = tst.vpmb_conservatism
- tst.vpmb_conservatism = 127
- compare(tst.vpmb_conservatism, 127)
+ var x26 = PrefTechnicalDetails.vpmb_conservatism
+ PrefTechnicalDetails.vpmb_conservatism = 127
+ compare(PrefTechnicalDetails.vpmb_conservatism, 127)
- var x27 = tst.zoomed_plot
- tst.zoomed_plot = true
- compare(tst.zoomed_plot, true)
+ var x27 = PrefTechnicalDetails.zoomed_plot
+ PrefTechnicalDetails.zoomed_plot = true
+ compare(PrefTechnicalDetails.zoomed_plot, true)
}
}
diff --git a/tests/tst_qPrefUnits.qml b/tests/tst_qPrefUnits.qml
index fe74ee965..22ae14a19 100644
--- a/tests/tst_qPrefUnits.qml
+++ b/tests/tst_qPrefUnits.qml
@@ -1,58 +1,49 @@
// 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 x1 = PrefUnits.coordinates_traditional
+ PrefUnits.coordinates_traditional = true
+ compare(PrefUnits.coordinates_traditional, true)
-//TBD var x2 = tst.duration_units
-//TBD tst.duration_units = ??
-//TBD compare(tst.duration_units, ??)
+//TBD var x2 = PrefUnits.duration_units
+//TBD PrefUnits.duration_units = ??
+//TBD compare(PrefUnits.duration_units, ??)
-//TBD var x3 = tst.length
-//TBD tst.=length = ??
-//TBD compare(tst.length, ??)
+//TBD var x3 = PrefUnits.length
+//TBD PrefUnits.=length = ??
+//TBD compare(PrefUnits.length, ??)
-//TBD var x4 = tst.pressure
-//TBD tst.pressure = ??
-//TBD compare(tst.pressure, ??)
+//TBD var x4 = PrefUnits.pressure
+//TBD PrefUnits.pressure = ??
+//TBD compare(PrefUnits.pressure, ??)
- var x5 = tst.show_units_table
- tst.show_units_table = true
- compare(tst.show_units_table, true)
+ var x5 = PrefUnits.show_units_table
+ PrefUnits.show_units_table = true
+ compare(PrefUnits.show_units_table, true)
-//TBD var x6 = tst.temperature
-//TBD tst.temperature = ??
-//TBD compare(tst.temperature, ??)
+//TBD var x6 = PrefUnits.temperature
+//TBD PrefUnits.temperature = ??
+//TBD compare(PrefUnits.temperature, ??)
- var x7 = tst.unit_system
- tst.unit_system = "metric"
- compare(tst.unit_system, "metric")
+ var x7 = PrefUnits.unit_system
+ PrefUnits.unit_system = "metric"
+ compare(PrefUnits.unit_system, "metric")
-//TBD var x8 = tst.vertical_speed_time
-//TBD tst.vertical_speed_time = ??
-//TBD compare(tst.vertical_speed_time, ??)
+//TBD var x8 = PrefUnits.vertical_speed_time
+//TBD PrefUnits.vertical_speed_time = ??
+//TBD compare(PrefUnits.vertical_speed_time, ??)
-//TBD var x9 = tst.volume
-//TBD tst.volume = ??
-//TBD compare(tst.volume, ??)
+//TBD var x9 = PrefUnits.volume
+//TBD PrefUnits.volume = ??
+//TBD compare(PrefUnits.volume, ??)
-//TBD var x10 = tst.weight
-//TBD tst.weight = ??
-//TBD compare(tst.weight, ??)
+//TBD var x10 = PrefUnits.weight
+//TBD PrefUnits.weight = ??
+//TBD compare(PrefUnits.weight, ??)
}
}
diff --git a/tests/tst_qPrefUpdateManager.qml b/tests/tst_qPrefUpdateManager.qml
index c1b0712a8..4772ada62 100644
--- a/tests/tst_qPrefUpdateManager.qml
+++ b/tests/tst_qPrefUpdateManager.qml
@@ -1,39 +1,30 @@
// SPDX-License-Identifier: GPL-2.0
import QtQuick 2.6
import QtTest 1.2
-import org.subsurfacedivelog.mobile 1.0
TestCase {
name: "qPrefUpdateManager"
- SsrfUpdateManagerPrefs {
- id: tst
- }
-
- SsrfPrefs {
- id: prefs
- }
-
function test_variables() {
- var x1 = tst.dont_check_for_updates
- tst.dont_check_for_updates = true;
- compare(tst.dont_check_for_updates, true)
+ var x1 = PrefUpdateManager.dont_check_for_updates
+ PrefUpdateManager.dont_check_for_updates = true;
+ compare(PrefUpdateManager.dont_check_for_updates, true)
- var x2 = tst.dont_check_exists
- tst.dont_check_exists = true
- compare(tst.dont_check_exists, true)
+ var x2 = PrefUpdateManager.dont_check_exists
+ PrefUpdateManager.dont_check_exists = true
+ compare(PrefUpdateManager.dont_check_exists, true)
- var x3 = tst.last_version_used
- tst.last_version_used = "jan again"
- compare(tst.last_version_used, "jan again")
+ var x3 = PrefUpdateManager.last_version_used
+ PrefUpdateManager.last_version_used = "jan again"
+ compare(PrefUpdateManager.last_version_used, "jan again")
- var x4 = tst.next_check
+ var x4 = PrefUpdateManager.next_check
var x4_date = Date.fromLocaleString(Qt.locale(), "01-01-2001", "dd-MM-yyyy")
- tst.next_check = x4_date
-//TBD compare(tst.next_check, x4_date)
+ PrefUpdateManager.next_check = x4_date
+//TBD compare(PrefUpdateManager.next_check, x4_date)
- var x5 = tst.uuidString
- tst.uuidString = "jan again"
- compare(tst.uuidString, "jan again")
+ var x5 = PrefUpdateManager.uuidString
+ PrefUpdateManager.uuidString = "jan again"
+ compare(PrefUpdateManager.uuidString, "jan again")
}
}