From cca09612d10bef5e0469196e7f5c210975aa8a02 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 17 Oct 2016 18:06:34 +0200 Subject: Testcases for display settings Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- tests/testpreferences.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests') 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) -- cgit v1.2.3-70-g09d2