From d82840b468318c7689e8da4235eb7798bdf6b832 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Sat, 28 Dec 2019 20:20:30 +0100 Subject: tests: fix testqPrefDisplay Font size are never stored on disk for the mobile version, so testing load/save does not make sense. add #ifndef SUBSURFACE_MOBILE Signed-off-by: Jan Iversen Signed-off-by: Dirk Hohndel --- tests/testqPrefDisplay.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/testqPrefDisplay.cpp b/tests/testqPrefDisplay.cpp index 5992b1bf2..6e7b31e18 100644 --- a/tests/testqPrefDisplay.cpp +++ b/tests/testqPrefDisplay.cpp @@ -106,10 +106,13 @@ void TestQPrefDisplay::test_set_load_struct() prefs.show_developer = false; display->load(); +#ifndef SUBSURFACE_MOBILE + // Font size is never stored on disk, but qPref grabs the system default + QCOMPARE(prefs.font_size, 15.0); +#endif QCOMPARE(prefs.animation_speed, 33); QCOMPARE(prefs.display_invalid_dives, true); QCOMPARE(prefs.divelist_font, "doNotCareString"); - QCOMPARE(prefs.font_size, 15.0); QCOMPARE(prefs.show_developer, true); QCOMPARE(display->theme(), QString("myTheme2")); QCOMPARE(display->lastDir(), QString("test2")); @@ -147,7 +150,10 @@ void TestQPrefDisplay::test_struct_disk() QCOMPARE(prefs.animation_speed, 27); QCOMPARE(prefs.display_invalid_dives, true); QCOMPARE(prefs.divelist_font, "doNotCareAtAll"); +#ifndef SUBSURFACE_MOBILE + // Font size is never stored on disk, but qPref grabs the system default QCOMPARE(prefs.font_size, 17.0); +#endif QCOMPARE(prefs.show_developer, false); } -- cgit v1.2.3-70-g09d2