Remove General test in testpreferences add the same General tests to testqPrefGeneral Signed-off-by: Jan Iversen <jani@apache.org>
29 lines
671 B
C++
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)
|