summaryrefslogtreecommitdiff
path: root/lily-test.h
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-04-04 16:42:05 -0500
committersanine <sanine.not@pm.me>2022-04-04 16:42:05 -0500
commitf133f0a424db19dd3263794e8fa71ea920ef3ea9 (patch)
tree178d3fc672acd38ff7c26aa2238a0e7507b81f0e /lily-test.h
parent2cef2d4e0bb490f8e5002e47368bac8e89dbeb88 (diff)
add lily_mock_t basic functionality
Diffstat (limited to 'lily-test.h')
-rw-r--r--lily-test.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/lily-test.h b/lily-test.h
index 51b440f..bf0bbae 100644
--- a/lily-test.h
+++ b/lily-test.h
@@ -151,4 +151,18 @@ typedef struct lily_mock_t {
lily_queue_t *values;
} lily_mock_t;
+lily_mock_t * lily_mock_create();
+void lily_mock_destroy(lily_mock_t *m);
+
+#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);
+
+#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,
+ struct lily_mock_arg_t *args,
+ size_t n_args,
+ unsigned int call_num);
+
#endif