mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Whitespace cleanup tests
Again, entirely script based. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
128fc5f4b8
commit
afe7e847d6
27 changed files with 321 additions and 313 deletions
|
@ -1,9 +1,9 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include "testqPrefDisplay.h"
|
||||
|
||||
#include "core/settings/qPref.h"
|
||||
#include "core/pref.h"
|
||||
#include "core/qthelper.h"
|
||||
#include "core/settings/qPref.h"
|
||||
|
||||
#include <QDate>
|
||||
#include <QTest>
|
||||
|
@ -25,7 +25,7 @@ void TestQPrefDisplay::test_struct_get()
|
|||
prefs.divelist_font = copy_qstring("comic");
|
||||
prefs.font_size = 12.0;
|
||||
prefs.show_developer = false;
|
||||
prefs.theme = copy_qstring("myTheme");
|
||||
prefs.theme = copy_qstring("myTheme");
|
||||
|
||||
QCOMPARE(display->display_invalid_dives(), prefs.display_invalid_dives);
|
||||
QCOMPARE(display->divelist_font(), QString(prefs.divelist_font));
|
||||
|
@ -44,7 +44,7 @@ void TestQPrefDisplay::test_set_struct()
|
|||
display->set_divelist_font("doNotCareAtAll");
|
||||
display->set_font_size(12.0);
|
||||
display->set_show_developer(false);
|
||||
display->set_theme("myTheme");
|
||||
display->set_theme("myTheme");
|
||||
|
||||
QCOMPARE(prefs.display_invalid_dives, true);
|
||||
QCOMPARE(prefs.divelist_font, "doNotCareAtAll");
|
||||
|
@ -55,7 +55,7 @@ void TestQPrefDisplay::test_set_struct()
|
|||
|
||||
void TestQPrefDisplay::test_set_load_struct()
|
||||
{
|
||||
// test set func -> load -> struct pref
|
||||
// test set func -> load -> struct pref
|
||||
|
||||
auto display = qPrefDisplay::instance();
|
||||
|
||||
|
@ -63,13 +63,13 @@ void TestQPrefDisplay::test_set_load_struct()
|
|||
display->set_divelist_font("doNotCareString");
|
||||
display->set_font_size(15.0);
|
||||
display->set_show_developer(true);
|
||||
display->set_theme("myTheme2");
|
||||
display->set_theme("myTheme2");
|
||||
|
||||
prefs.display_invalid_dives = true;
|
||||
prefs.divelist_font = copy_qstring("doNotCareAtAll");
|
||||
prefs.font_size = 12.0;
|
||||
prefs.show_developer = false;
|
||||
prefs.theme = copy_qstring("myTheme");
|
||||
prefs.theme = copy_qstring("myTheme");
|
||||
|
||||
display->load();
|
||||
QCOMPARE(prefs.display_invalid_dives, false);
|
||||
|
@ -89,14 +89,14 @@ void TestQPrefDisplay::test_struct_disk()
|
|||
prefs.divelist_font = copy_qstring("doNotCareAtAll");
|
||||
prefs.font_size = 17.0;
|
||||
prefs.show_developer = false;
|
||||
prefs.theme = copy_qstring("myTheme3");
|
||||
prefs.theme = copy_qstring("myTheme3");
|
||||
|
||||
display->sync();
|
||||
prefs.display_invalid_dives = false;
|
||||
prefs.divelist_font = copy_qstring("noString");
|
||||
prefs.font_size = 11.0;
|
||||
prefs.show_developer = true;
|
||||
prefs.theme = copy_qstring("myTheme");
|
||||
prefs.theme = copy_qstring("myTheme");
|
||||
|
||||
display->load();
|
||||
QCOMPARE(prefs.display_invalid_dives, true);
|
||||
|
@ -114,14 +114,14 @@ void TestQPrefDisplay::test_multiple()
|
|||
prefs.divelist_font = copy_qstring("comic");
|
||||
prefs.font_size = 11.0;
|
||||
prefs.show_developer = true;
|
||||
prefs.theme = copy_qstring("myTheme");
|
||||
prefs.theme = copy_qstring("myTheme");
|
||||
auto display_direct = new qPrefDisplay;
|
||||
|
||||
prefs.display_invalid_dives = true;
|
||||
prefs.divelist_font = copy_qstring("multipleCharsInString");
|
||||
prefs.font_size = 15.0;
|
||||
prefs.show_developer = false;
|
||||
prefs.theme = copy_qstring("myTheme8");
|
||||
prefs.theme = copy_qstring("myTheme8");
|
||||
auto display = qPrefDisplay::instance();
|
||||
|
||||
QCOMPARE(display->display_invalid_dives(), display_direct->display_invalid_dives());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue