X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fudp.c;h=cdcd4ba4c7cfff20c9bbd9a5bcd72168d2630b61;hb=521e830fe336a17bee6e7376e3bf01a3b35ddc37;hp=df73b2614cebd5a89b55f834736212a7b69e0d7c;hpb=540b884236fe1e2d5e6cd52c70881d74e0fcea63;p=m6w6%2Flibmemcached diff --git a/tests/udp.c b/tests/udp.c index df73b261..cdcd4ba4 100644 --- a/tests/udp.c +++ b/tests/udp.c @@ -1,8 +1,19 @@ +/* LibMemcached + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ + /* Sample test application. */ #include -#include +#include #include #include #include @@ -14,18 +25,23 @@ #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"; + memcached_return_t rc; + 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[] ={