From 2cef2d4e0bb490f8e5002e47368bac8e89dbeb88 Mon Sep 17 00:00:00 2001 From: sanine Date: Mon, 4 Apr 2022 16:04:17 -0500 Subject: add LILY_NARGS() --- tests/mock_queue.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests/mock_queue.c') diff --git a/tests/mock_queue.c b/tests/mock_queue.c index bc00325..4015c68 100644 --- a/tests/mock_queue.c +++ b/tests/mock_queue.c @@ -59,3 +59,20 @@ const char* test_mock_enqueue_dequeue_heterogenous() return 0; } + + +const char* test_LILY_NARGS() +{ + int n = 5; + const char *str = "hello, world!"; + lily_queue_t *q; + + struct lily_mock_arg_t args[] = + { { sizeof(int), &n }, + { sizeof(const char *), &str }, + { sizeof(lily_queue_t *), &q }, + }; + if (LILY_NARGS(args) != 3) return "incorrect argument count!"; + + return 0; +} -- cgit v1.2.1