diff options
Diffstat (limited to 'lily-test.c')
-rw-r--r-- | lily-test.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lily-test.c b/lily-test.c index ec0a1f7..2f43a28 100644 --- a/lily-test.c +++ b/lily-test.c @@ -333,6 +333,12 @@ void lily_mock_destroy(lily_mock_t *m) free(m); } +void lily_mock_use(lily_mock_t **m) +{ + if (*m != NULL) lily_mock_destroy(*m); + *m = lily_mock_create(); +} + void _lily_mock_call(lily_mock_t *m, struct lily_mock_arg_t *args, size_t n_args) { m->n_calls += 1; |