MySQL  8.0.17
Source Code Documentation
suite_stubs.h
Go to the documentation of this file.
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 */
void append(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1)
Definition: suite_stubs.c:73
bool test_setup(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1)
Definition: suite_stubs.c:16
void prepend(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1)
Definition: suite_stubs.c:93
void flush(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1)
Definition: suite_stubs.c:97
void delay(int amt)
Definition: suite_stubs.c:27
struct test_harness testHarness
Definition: suite_stubs.c:12
void incrWithDefault(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1)
Definition: suite_stubs.c:117
void del(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1)
Definition: suite_stubs.c:101
struct test_harness test_harness
Definition: basic_engine_testsuite.c:11
int expiry
Definition: suite_stubs.c:10
void decrWithDefault(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1)
Definition: suite_stubs.c:85
MEMCACHED_PUBLIC_API bool setup_suite(struct test_harness *th)
Definition: basic_engine_testsuite.c:828
bool teardown(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1)
Definition: suite_stubs.c:22
void assertNotExists(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1)
Definition: suite_stubs.c:151
MEMCACHED_PUBLIC_API engine_test_t * get_tests(void)
Definition: basic_engine_testsuite.c:792
void add(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1)
Definition: suite_stubs.c:69
void checkValue(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1, const char *exp)
Definition: suite_stubs.c:126
void incr(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1)
Definition: suite_stubs.c:109
bool hasError
Definition: suite_stubs.c:11
void decr(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1)
Definition: suite_stubs.c:77