summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2016-10-17 18:06:34 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-10-18 11:13:33 -0700
commitcca09612d10bef5e0469196e7f5c210975aa8a02 (patch)
tree743e9c458df8d0ceb1fda94118308f7ce7eea08f /tests
parent4ce0146e6edf094a1ff869ba8f86fd5bcbd7f95d (diff)
downloadsubsurface-cca09612d10bef5e0469196e7f5c210975aa8a02.tar.gz
Testcases for display settings
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/testpreferences.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/testpreferences.cpp b/tests/testpreferences.cpp
index ba8e6feaf..e8e3f0995 100644
--- a/tests/testpreferences.cpp
+++ b/tests/testpreferences.cpp
@@ -485,6 +485,24 @@ void TestPreferences::testPreferences()
TEST(general->pscrRatio(), 1);
TEST(general->useDefaultFile(), false);
+ auto display = pref->display_settings;
+ display->setDivelistFont("comic");
+ display->setFontSize(10.0);
+ display->setDisplayInvalidDives(true);
+
+ TEST(display->divelistFont(),QStringLiteral("comic"));
+ TEST(display->fontSize(), 10.0);
+ TEST(display->displayInvalidDives(),(short) true); //TODO: this is true / false.
+
+ display->setDivelistFont("helvetica");
+ display->setFontSize(14.0);
+ display->setDisplayInvalidDives(false);
+
+ TEST(display->divelistFont(),QStringLiteral("helvetica"));
+ TEST(display->fontSize(), 14.0);
+ TEST(display->displayInvalidDives(),(short) false);
+
+
}
QTEST_MAIN(TestPreferences)