Sample test application.
*/
#include <assert.h>
-#include <memcached.h>
+#include <libmemcached/memcached.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "test.h"
#include "server.h"
-uint8_t set_test(memcached_st *memc)
+/* Prototypes */
+test_return_t set_test(memcached_st *memc);
+void *world_create(void);
+void world_destroy(void *p);
+
+test_return_t set_test(memcached_st *memc)
{
memcached_return rc;
- char *key= "foo";
- char *value= "when we sanitize";
+ const char *key= "foo";
+ const char *value= "when we sanitize";
- rc= memcached_set(memc, key, strlen(key),
+ rc= memcached_set(memc, key, strlen(key),
value, strlen(value),
(time_t)0, (uint32_t)0);
- assert(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
+ test_truth(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
- return 0;
+ return TEST_SUCCESS;
}
test_st tests[] ={