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
|
@ -154,15 +154,13 @@ void TestQPrefDisplay::test_struct_disk()
|
|||
void TestQPrefDisplay::test_multiple()
|
||||
{
|
||||
// test multiple instances have the same information
|
||||
auto display_direct = qPrefDisplay::instance();
|
||||
prefs.divelist_font = copy_qstring("comic");
|
||||
|
||||
auto display = qPrefDisplay::instance();
|
||||
prefs.font_size = 15.0;
|
||||
|
||||
QCOMPARE(display->divelist_font(), display_direct->divelist_font());
|
||||
QCOMPARE(display->divelist_font(), qPrefDisplay::divelist_font());
|
||||
QCOMPARE(display->divelist_font(), QString("comic"));
|
||||
QCOMPARE(display->font_size(), display_direct->font_size());
|
||||
QCOMPARE(display->font_size(), qPrefDisplay::font_size());
|
||||
QCOMPARE(display->font_size(), 15.0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue