blob: 0ae4a7cad53d9206252e3c5691ca0d4dd56163bd [file] [log] [blame]
#include "test-mock.h"
DEFINE_STRUCT_CLASS_MOCK_VOID_RETURN(METHOD(fail), CLASS(test),
PARAMS(struct test *,
struct test_stream *));
DEFINE_STRUCT_CLASS_MOCK_VOID_RETURN(METHOD(mock_vprintk), CLASS(test),
PARAMS(const struct test *,
const char *,
struct va_format *));
static int test_init(struct MOCK(test) *mock_test)
{
struct test *trgt = mock_get_trgt(mock_test);
int ret;
ret = test_init_test(trgt, "MOCK(test)");
trgt->fail = fail;
mock_set_default_action(mock_get_ctrl(mock_test),
"fail",
fail,
int_return(mock_get_test(mock_test), 0));
trgt->vprintk = mock_vprintk;
mock_set_default_action(mock_get_ctrl(mock_test),
"mock_vprintk",
mock_vprintk,
int_return(mock_get_test(mock_test), 0));
return ret;
}
DEFINE_STRUCT_CLASS_MOCK_INIT(test, test_init);