df73b2614cebd5a89b55f834736212a7b69e0d7c
2 Sample test application.
10 #include <sys/types.h>
17 uint8_t set_test(memcached_st
*memc
)
21 char *value
= "when we sanitize";
23 rc
= memcached_set(memc
, key
, strlen(key
),
25 (time_t)0, (uint32_t)0);
26 assert(rc
== MEMCACHED_SUCCESS
|| rc
== MEMCACHED_BUFFERED
);
32 {"set", 1, set_test
},
36 collection_st collection
[] ={
41 #define SERVERS_TO_CREATE 1
43 void *world_create(void)
45 server_startup_st
*construct
;
47 construct
= (server_startup_st
*)malloc(sizeof(server_startup_st
));
48 memset(construct
, 0, sizeof(server_startup_st
));
49 construct
->count
= SERVERS_TO_CREATE
;
51 server_startup(construct
);
56 void world_destroy(void *p
)
58 server_startup_st
*construct
= (server_startup_st
*)p
;
59 memcached_server_st
*servers
= (memcached_server_st
*)construct
->servers
;
60 memcached_server_list_free(servers
);
62 server_shutdown(construct
);
66 void get_world(world_st
*world
)
68 world
->collections
= collection
;
69 world
->create
= world_create
;
70 world
->destroy
= world_destroy
;