mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
tests: correct testqPref*.cpp to use static qPref* functions.
qPref* set/get functions are static. remove creation of qPref* instances, reference static functions. Signed-off-by: Jan Iversen <jan@casacondor.com>
This commit is contained in:
parent
54f8217eec
commit
6e846eb4c0
13 changed files with 38 additions and 61 deletions
|
@ -141,15 +141,14 @@ void TestQPrefLanguage::test_multiple()
|
|||
// test multiple instances have the same information
|
||||
|
||||
prefs.locale.use_system_language = false;
|
||||
auto tst_direct = new qPrefLanguage;
|
||||
|
||||
prefs.time_format_override = true;
|
||||
auto tst = qPrefLanguage::instance();
|
||||
|
||||
QCOMPARE(tst->use_system_language(), tst_direct->use_system_language());
|
||||
QCOMPARE(tst->time_format_override(), tst_direct->time_format_override());
|
||||
QCOMPARE(tst_direct->use_system_language(), false);
|
||||
QCOMPARE(tst_direct->time_format_override(), true);
|
||||
QCOMPARE(tst->use_system_language(), qPrefLanguage::use_system_language());
|
||||
QCOMPARE(tst->time_format_override(), qPrefLanguage::time_format_override());
|
||||
QCOMPARE(qPrefLanguage::use_system_language(), false);
|
||||
QCOMPARE(qPrefLanguage::time_format_override(), true);
|
||||
}
|
||||
|
||||
#define TEST(METHOD, VALUE) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue