diff options
author | sanine <sanine.net@pm.me> | 2022-07-14 11:30:59 -0500 |
---|---|---|
committer | sanine <sanine.net@pm.me> | 2022-07-14 11:30:59 -0500 |
commit | 3381872933f96899efbbaf31cd832ff6b2ccb0cc (patch) | |
tree | 663f9c07184b90565431e24e6e690c92d4181fc7 /lily-test.h | |
parent | 089eead7853a9a211253f720c309328a90669b25 (diff) |
add lily_mock_use
Diffstat (limited to 'lily-test.h')
-rw-r--r-- | lily-test.h | 9 |
1 files changed, 8 insertions, 1 deletions
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, |