Ignore *.exe
[awesomized/libmemcached] / tests / mem_plus.cc
1 /*
2 C++ to libmemcit
3 */
4 #include "test.h"
5 #include <stdio.h>
6 #include <stdlib.h>
7 #include <string.h>
8
9 #include <libmemcached/memcached.h>
10
11 static test_return_t exists_test(void *obj)
12 {
13 Memcached memc;
14 (void)obj;
15 (void)memc;
16
17 return TEST_SUCCESS;
18 }
19
20 static test_return_t new_test(void *obj)
21 {
22 Memcached *memc= new Memcached;
23 (void)obj;
24
25 (void)memc;
26
27 delete memc;
28
29 return TEST_SUCCESS;
30 }
31
32 static test_return_t copy_test(void *obj)
33 {
34 Memcached *memc= new Memcached;
35 Memcached *copy(memc);
36 (void)obj;
37
38 (void)copy;
39
40 delete memc;
41
42 return TEST_SUCCESS;
43 }
44
45 static test_return_t assign_test(void *obj)
46 {
47 Memcached memc;
48 Memcached copy;
49 (void)obj;
50
51 copy= memc;
52
53 (void)copy;
54
55 return TEST_SUCCESS;
56 }
57
58 test_st basic[] ={
59 { "exists", 0, reinterpret_cast<test_callback_fn>(exists_test) },
60 { "new", 0, reinterpret_cast<test_callback_fn>(new_test) },
61 { "copy", 0, reinterpret_cast<test_callback_fn>(copy_test) },
62 { "assign", 0, reinterpret_cast<test_callback_fn>(assign_test) },
63 { 0, 0, 0}
64 };
65
66 collection_st collection[] ={
67 {"basic", 0, 0, basic},
68 {0, 0, 0, 0}
69 };
70
71 void get_world(world_st *world)
72 {
73 world->collections= collection;
74 }