subsurface/tests/testpreferences.cpp
jan Iversen 91ec0fe8d4 tests: move General test from testpreferences
Remove General test in testpreferences
add the same General tests to testqPrefGeneral

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 09:09:06 -07:00

29 lines
671 B
C++

// SPDX-License-Identifier: GPL-2.0
#include "testpreferences.h"
#include "core/subsurface-qt/SettingsObjectWrapper.h"
#include <QDate>
#include <QtTest>
#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)