MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
suite_stubs.h
1 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 #ifndef TESTSUITE_H
3 #define TESTSUITE_H 1
4 
5 #include <memcached/engine.h>
6 #include <memcached/engine_testapp.h>
7 #include <assert.h>
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 MEMCACHED_PUBLIC_API
14 engine_test_t* get_tests(void);
15 
16 MEMCACHED_PUBLIC_API
17 bool setup_suite(struct test_harness *th);
18 
19 
20 bool test_setup(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
21 bool teardown(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
22 void delay(int amt);
23 void add(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
24 void append(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
25 void decr(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
26 void decrWithDefault(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
27 void prepend(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
28 void flush(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
29 void del(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
30 void set(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
31 void incr(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
32 void incrWithDefault(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
33 
34 void checkValue(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1, const char* exp);
35 void assertNotExists(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
36 
37 #define assertHasError() assert(hasError)
38 #define assertHasNoError() assert(!hasError)
39 
40 extern int expiry;
41 extern bool hasError;
42 extern struct test_harness testHarness;
43 
44 #ifdef __cplusplus
45 }
46 #endif
47 
48 #endif /* SUITE_STUBS_H */