diff options
author | jan Iversen <jani@apache.org> | 2018-08-08 21:25:47 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-13 11:49:32 -0700 |
commit | d72546e7993914c7dc97fa782ff84d5373beeb50 (patch) | |
tree | e31bc0e35672951ced99fa56c9f4899ec298cf42 /tests/tst_qPrefLanguage.qml | |
parent | 526c1324fc716c881120c411ad13fdea7c2cdb5f (diff) | |
download | subsurface-d72546e7993914c7dc97fa782ff84d5373beeb50.tar.gz |
tests: add Language qml test cases
Add tst_qPrefLanguage qml file to test C++ qml connection
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'tests/tst_qPrefLanguage.qml')
-rw-r--r-- | tests/tst_qPrefLanguage.qml | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/tst_qPrefLanguage.qml b/tests/tst_qPrefLanguage.qml new file mode 100644 index 000000000..efcc35534 --- /dev/null +++ b/tests/tst_qPrefLanguage.qml @@ -0,0 +1,50 @@ +// 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 x2 = tst.date_format_override + tst.date_format_override = true + compare(tst.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 x4 = tst.language + tst.language = "new lang format" + compare(tst.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 x6 = tst.time_format + tst.time_format = "new time format" + compare(tst.time_format, "new time format") + + var x7 = tst.time_format_override + tst.time_format_override = true + compare(tst.time_format_override, true) + + var x8 = tst.use_system_language + tst.use_system_language = true + compare(tst.use_system_language, true) + } +} |