// SPDX-License-Identifier: GPL-2.0 #include "testpreferences.h" #include "core/subsurface-qt/SettingsObjectWrapper.h" #include #include #define TEST(METHOD, VALUE) \ QCOMPARE(METHOD, VALUE); \ pref->sync(); \ pref->load(); \ QCOMPARE(METHOD, VALUE); void TestPreferences::initTestCase() { QCoreApplication::setOrganizationName("Subsurface"); QCoreApplication::setOrganizationDomain("subsurface.hohndel.org"); QCoreApplication::setApplicationName("SubsurfaceTestPreferences"); } void TestPreferences::testPreferences() { auto pref = SettingsObjectWrapper::instance(); pref->load(); } QTEST_MAIN(TestPreferences)