summaryrefslogtreecommitdiff
path: root/src/test/mock_queue.h
blob: 1c2bbf7a7ffe751eee467002cc3b121915f5f252 (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();
void mock_queue_cleanup();

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 = raw;				\
      mock_queue_data(sizeof(type), &data);	\
   } while(0)

#define mock_front(type) * (type *) mock_front_data()

void mock_pop();

#endif