diff options
Diffstat (limited to 'src/test/mock_queue.h')
-rw-r--r-- | src/test/mock_queue.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/mock_queue.h b/src/test/mock_queue.h new file mode 100644 index 0000000..9cfd415 --- /dev/null +++ b/src/test/mock_queue.h @@ -0,0 +1,23 @@ +#ifndef MOCK_QUEUE_H +#define MOCK_QUEUE_H + +#include <stdlib.h> + +void mock_queue_init(); + +size_t mock_queue_len(); + +void mock_queue_data(size_t size, void *data); +void * mock_front_data(); + +#define mock_queue(type, raw) do { \ + type *data = malloc(sizeof(type)); \ + *data = raw; \ + mock_queue_data(sizeof(type), data); \ + } while(0) + +#define mock_front(type) * (type *) mock_front_data() + +void mock_pop(); + +#endif |