summaryrefslogtreecommitdiffstats
path: root/tests/testqPrefDisplay.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-09-02 09:13:04 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-07 14:37:18 -0700
commita93ecf3912bcd78930487b0e05f41ebd5c6e7ed4 (patch)
tree71e64c5d6ff705989ea68c7d3823752eb5100476 /tests/testqPrefDisplay.cpp
parentee6b5643b5581ec3fda3873543f9275235ae0598 (diff)
downloadsubsurface-a93ecf3912bcd78930487b0e05f41ebd5c6e7ed4.tar.gz
tests: update qPref* to the shadow variable
The shadow variable causes properties only to be saved when actual changed, therefore some test cases need update Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'tests/testqPrefDisplay.cpp')
-rw-r--r--tests/testqPrefDisplay.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/testqPrefDisplay.cpp b/tests/testqPrefDisplay.cpp
index ce4d627ed..9347e252f 100644
--- a/tests/testqPrefDisplay.cpp
+++ b/tests/testqPrefDisplay.cpp
@@ -41,7 +41,7 @@ void TestQPrefDisplay::test_set_struct()
auto display = qPrefDisplay::instance();
display->set_animation_speed(27);
- display->set_display_invalid_dives(true);
+ display->set_display_invalid_dives(false);
display->set_divelist_font("doNotCareAtAll");
display->set_font_size(12.0);
display->set_show_developer(false);
@@ -58,7 +58,7 @@ void TestQPrefDisplay::test_set_struct()
display->set_lastState(17);
QCOMPARE(prefs.animation_speed, 27);
- QCOMPARE(prefs.display_invalid_dives, true);
+ QCOMPARE(prefs.display_invalid_dives, false);
QCOMPARE(prefs.divelist_font, "doNotCareAtAll");
QCOMPARE(prefs.font_size, 12.0);
QCOMPARE(prefs.show_developer, false);
@@ -82,7 +82,7 @@ void TestQPrefDisplay::test_set_load_struct()
auto display = qPrefDisplay::instance();
display->set_animation_speed(33);
- display->set_display_invalid_dives(false);
+ display->set_display_invalid_dives(true);
display->set_divelist_font("doNotCareString");
display->set_font_size(15.0);
display->set_show_developer(true);
@@ -99,14 +99,14 @@ void TestQPrefDisplay::test_set_load_struct()
display->set_lastState(27);
prefs.animation_speed = 17;
- prefs.display_invalid_dives = true;
+ prefs.display_invalid_dives = false;
prefs.divelist_font = copy_qstring("doNotCareAtAll");
prefs.font_size = 12.0;
prefs.show_developer = false;
display->load();
QCOMPARE(prefs.animation_speed, 33);
- QCOMPARE(prefs.display_invalid_dives, false);
+ QCOMPARE(prefs.display_invalid_dives, true);
QCOMPARE(prefs.divelist_font, "doNotCareString");
QCOMPARE(prefs.font_size, 15.0);
QCOMPARE(prefs.show_developer, true);