From 3381872933f96899efbbaf31cd832ff6b2ccb0cc Mon Sep 17 00:00:00 2001 From: sanine Date: Thu, 14 Jul 2022 11:30:59 -0500 Subject: add lily_mock_use --- lily-test.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lily-test.h') diff --git a/lily-test.h b/lily-test.h index bf896a6..b5f380c 100644 --- a/lily-test.h +++ b/lily-test.h @@ -231,14 +231,21 @@ typedef struct lily_mock_t { lily_mock_t * lily_mock_create(); /** tear down mock function storage */ void lily_mock_destroy(lily_mock_t *m); - +/** automatically re-create mock function storage */ +void lily_mock_use(lily_mock_t **m); /** store a call to a mock function */ +#define lily_mock_store_call(m, args) \ + _lily_mock_call(m, args, LILY_NARGS(args)) +/* lily_mock_call is deprecated!! do not use it in new programs */ #define lily_mock_call(m, args) \ _lily_mock_call(m, args, LILY_NARGS(args)) void _lily_mock_call(lily_mock_t *m, struct lily_mock_arg_t *args, size_t n_args); /** retrieve a call to a mock function */ +#define lily_mock_get_call(m, args, call_num) \ + _lily_get_call(m, args, LILY_NARGS(args), call_num) +/* lily_get_call is deprecated!! do not use it in new programs */ #define lily_get_call(m, args, call_num) \ _lily_get_call(m, args, LILY_NARGS(args), call_num) void _lily_get_call(lily_mock_t *m, -- cgit v1.2.1