summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/main.c1
-rw-r--r--tests/mock_queue.c17
-rw-r--r--tests/tests.h1
3 files changed, 19 insertions, 0 deletions
diff --git a/tests/main.c b/tests/main.c
index 062e5f8..f4e634c 100644
--- a/tests/main.c
+++ b/tests/main.c
@@ -23,6 +23,7 @@ int main()
run_test(test_mock_enqueue_dequeue_int);
run_test(test_mock_enqueue_dequeue_heterogenous);
+ run_test(test_LILY_NARGS);
return 0;
}
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;
+}
diff --git a/tests/tests.h b/tests/tests.h
index 266cc04..39ad153 100644
--- a/tests/tests.h
+++ b/tests/tests.h
@@ -20,5 +20,6 @@ const char* test_assert_int_not_equal();
const char* test_mock_enqueue_dequeue_int();
const char* test_mock_enqueue_dequeue_heterogenous();
+const char* test_LILY_NARGS();
#endif