Huge refactoring of directory structure.
[awesomized/libmemcached] / tests / test.h
1 /*
2 Structures for generic tests.
3 */
4 #ifdef __cplusplus
5 extern "C" {
6
7 #endif
8 #include <libmemcached/memcached.h>
9 #include "../libmemcached/common.h"
10
11 typedef struct world_st world_st;
12 typedef struct collection_st collection_st;
13 typedef struct test_st test_st;
14
15 struct test_st {
16 char *name;
17 unsigned int requires_flush;
18 uint8_t (*function)(memcached_st *memc);
19 };
20
21 struct collection_st {
22 char *name;
23 memcached_return (*pre)(memcached_st *memc);
24 memcached_return (*post)(memcached_st *memc);
25 test_st *tests;
26 };
27
28 struct world_st {
29 collection_st *collections;
30 void *(*create)(void);
31 void (*destroy)(void *collection_object);
32 };
33
34 /* How we make all of this work :) */
35 void get_world(world_st *world);
36
37 #ifdef __cplusplus
38 }
39 #endif