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 "disable_optimize.h"
6
7#include <memcached/engine.h>
8#include <memcached/engine_testapp.h>
9#include <platform/cbassert.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15MEMCACHED_PUBLIC_API
16engine_test_t* get_tests(void);
17
18MEMCACHED_PUBLIC_API
19bool setup_suite(struct test_harness *th);
20
21
22bool test_setup(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
23bool teardown(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
24void delay(int amt);
25void add(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
26void append(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
27void decr(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
28void decrWithDefault(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
29void prepend(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
30void flush(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
31void del(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
32void set(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
33void incr(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
34void incrWithDefault(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
35
36void checkValue(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1, const char* exp);
37void assertNotExists(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1);
38
39#define assertHasError() cb_assert(hasError)
40#define assertHasNoError() cb_assert(!hasError)
41
42extern int expiry;
43extern bool hasError;
44extern struct test_harness testHarness;
45
46engine_test_t* get_tests_0(void);
47engine_test_t* get_tests_1(void);
48engine_test_t* get_tests_2(void);
49engine_test_t* get_tests_3(void);
50engine_test_t* get_tests_4(void);
51engine_test_t* get_tests_5(void);
52engine_test_t* get_tests_6(void);
53engine_test_t* get_tests_7(void);
54engine_test_t* get_tests_8(void);
55engine_test_t* get_tests_9(void);
56
57#ifdef __cplusplus
58}
59#endif
60
61#endif /* SUITE_STUBS_H */
62