You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
falk-werner_webfused/test/mock_settings.cc

45 lines
665 B

#include "mock_settings.hpp"
extern "C"
{
using webfused_test::ISettings;
static ISettings * wfd_mock_settings = nullptr;
extern char const *
__real_wfd_settings_get(
struct wfd_settings * settings,
char const * key);
char const *
__wrap_wfd_settings_get(
struct wfd_settings * settings,
char const * key)
{
if (nullptr == wfd_mock_settings)
{
return __real_wfd_settings_get(settings, key);
}
else
{
return wfd_mock_settings->get(key);
}
}
}
namespace webfused_test
{
MockSettings::MockSettings()
{
wfd_mock_settings = this;
}
MockSettings::~MockSettings()
{
wfd_mock_settings = nullptr;
}
}