1
0
mirror of https://github.com/falk-werner/webfused synced 2024-10-27 20:44:08 +00:00
falk-werner_webfused/test/mock/settings.cc

27 lines
642 B
C++
Raw Normal View History

2020-03-20 12:48:58 +00:00
#include "mock/settings.hpp"
2020-03-20 13:16:32 +00:00
#include "util/wrap.hpp"
2020-03-18 09:17:17 +00:00
extern "C"
{
2020-03-20 13:16:32 +00:00
static webfused_test::ISettings * wfd_MockSettings = nullptr;
2020-03-18 09:17:17 +00:00
2020-03-20 13:16:32 +00: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 09:17:17 +00:00
}
namespace webfused_test
{
MockSettings::MockSettings()
{
2020-03-20 13:16:32 +00:00
wfd_MockSettings = this;
2020-03-18 09:17:17 +00:00
}
MockSettings::~MockSettings()
{
2020-03-20 13:16:32 +00:00
wfd_MockSettings = nullptr;
2020-03-18 09:17:17 +00:00
}
}