summaryrefslogtreecommitdiffstats
path: root/tests/tst_qPrefLanguage.qml
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 /tests/tst_qPrefLanguage.qml
parent684e334fb6098e604a91d140c1e2ea0883dff081 (diff)
downloadsubsurface-1ee726597239db4e1fd66b5ad70983a127280414.tar.gz
tests: update qml test cases
use new qml registration Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'tests/tst_qPrefLanguage.qml')
-rw-r--r--tests/tst_qPrefLanguage.qml58
1 files changed, 24 insertions, 34 deletions
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)
}
}