blob: 9cfd41599fcc43b20bd0f5e170502fc8a9ef616c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
|