From: Brian Aker Date: Sat, 18 Feb 2012 02:40:33 +0000 (-0800) Subject: Update test X-Git-Tag: 1.0.5~37 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=c119fee4aeefd8311b8438a08eb6e43bd3e6c6fb;p=m6w6%2Flibmemcached Update test --- diff --git a/tests/libmemcached-1.0/all_tests.h b/tests/libmemcached-1.0/all_tests.h index c9134a51..47db429d 100644 --- a/tests/libmemcached-1.0/all_tests.h +++ b/tests/libmemcached-1.0/all_tests.h @@ -60,7 +60,7 @@ test_st tests[] ={ {"memcached_fetch_result(MEMCACHED_NOTFOUND)", true, (test_callback_fn*)memcached_fetch_result_NOT_FOUND }, {"replace", true, (test_callback_fn*)replace_test }, {"delete", true, (test_callback_fn*)delete_test }, - {"get", true, (test_callback_fn*)get_test }, + {"memcached_get()", true, (test_callback_fn*)get_test }, {"get2", false, (test_callback_fn*)get_test2 }, {"get3", false, (test_callback_fn*)get_test3 }, {"get4", false, (test_callback_fn*)get_test4 }, diff --git a/tests/libmemcached-1.0/mem_functions.cc b/tests/libmemcached-1.0/mem_functions.cc index 3a42c3e4..3fcba995 100644 --- a/tests/libmemcached-1.0/mem_functions.cc +++ b/tests/libmemcached-1.0/mem_functions.cc @@ -1188,23 +1188,20 @@ test_return_t read_through(memcached_st *memc) test_return_t get_test(memcached_st *memc) { - memcached_return_t rc; - char *string; - size_t string_length; - uint32_t flags; - uint64_t query_id= memcached_query_id(memc); - rc= memcached_delete(memc, - test_literal_param(__func__), - time_t(0)); - test_true_got(rc == MEMCACHED_BUFFERED or rc == MEMCACHED_NOTFOUND, memcached_last_error_message(memc)); + memcached_return_t rc= memcached_delete(memc, + test_literal_param(__func__), + time_t(0)); + test_true_hint(rc == MEMCACHED_BUFFERED or rc == MEMCACHED_NOTFOUND, memcached_last_error_message(memc)); test_compare(query_id +1, memcached_query_id(memc)); - string= memcached_get(memc, + size_t string_length; + uint32_t flags; + char *string= memcached_get(memc, test_literal_param(__func__), &string_length, &flags, &rc); - test_compare_got(MEMCACHED_NOTFOUND, rc, memcached_strerror(NULL, rc)); + test_compare_got(MEMCACHED_NOTFOUND, rc, memcached_last_error_message(memc)); test_false(string_length); test_false(string);