summaryrefslogtreecommitdiff
path: root/tests/mock_queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mock_queue.c')
-rw-r--r--tests/mock_queue.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/mock_queue.c b/tests/mock_queue.c
index 493d397..07a5379 100644
--- a/tests/mock_queue.c
+++ b/tests/mock_queue.c
@@ -118,3 +118,17 @@ const char* test_lily_mock_call()
lily_mock_destroy(m);
return 0;
}
+
+
+const char * test_lily_mock_use()
+{
+ lily_mock_t *m = NULL;
+ lily_mock_use(&m);
+ if (m == NULL) return "m was still null!";
+ m->n_calls = 5;
+ lily_mock_use(&m);
+ if (m == NULL) return "m was later null!";
+ if (m->n_calls != 0) return "m was not re-allocated!";
+ lily_mock_destroy(m);
+ return 0;
+}