From: Brian Aker Date: Tue, 5 Apr 2011 02:31:23 +0000 (-0700) Subject: Extend test to report answer. X-Git-Tag: 0.51~15^2~43 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=ac00b21c606ebea4c73f11332ac66a584a24228c;p=awesomized%2Flibmemcached Extend test to report answer. --- diff --git a/tests/mem_functions.c b/tests/mem_functions.c index 600ffb8f..9a5c053d 100644 --- a/tests/mem_functions.c +++ b/tests/mem_functions.c @@ -231,7 +231,12 @@ static memcached_return_t server_display_unsort_function(const memcached_st *ptr uint32_t x= *((uint32_t *)(context)); (void)ptr; - assert(test_ports[x] == server->port); + if (! (test_ports[x] == server->port)) + { + fprintf(stderr, "%lu -> %lu\n", (unsigned long)test_ports[x], (unsigned long)server->port); + return MEMCACHED_FAILURE; + } + *((uint32_t *)(context))= ++x; return MEMCACHED_SUCCESS;