1
0
mirror of https://github.com/falk-werner/webfused synced 2026-03-02 04:09:19 +00:00
Files
falk-werner_webfused/test/mock/settings.cc

27 lines
642 B
C++
Raw Normal View History

2020-03-20 13:48:58 +01:00
#include "mock/settings.hpp"
2020-03-20 14:16:32 +01:00
#include "util/wrap.hpp"
2020-03-18 10:17:17 +01:00
extern "C"
{
2020-03-20 14:16:32 +01:00
static webfused_test::ISettings * wfd_MockSettings = nullptr;
2020-03-18 10:17:17 +01:00
2020-03-20 14:16:32 +01:00
WFD_WRAP_FUNC2(wfd_MockSettings, char const *, wfd_settings_get_string, struct wfd_settings *, char const *);
WFD_WRAP_FUNC3(wfd_MockSettings, char const *, wfd_settings_get_string_or_default,
struct wfd_settings *, char const *, char const *);
WFD_WRAP_FUNC2(wfd_MockSettings, bool, wfd_settings_get_bool, struct wfd_settings *, char const *);
2020-03-18 10:17:17 +01:00
}
namespace webfused_test
{
MockSettings::MockSettings()
{
2020-03-20 14:16:32 +01:00
wfd_MockSettings = this;
2020-03-18 10:17:17 +01:00
}
MockSettings::~MockSettings()
{
2020-03-20 14:16:32 +01:00
wfd_MockSettings = nullptr;
2020-03-18 10:17:17 +01:00
}
}