X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Flibmemcached-1.0%2Ftouch.cc;h=07f0096f00fa112d4fcb51b080b3370825c2ff71;hb=25efe3485198149616820ab4e52d2f18f0abe5a7;hp=50e6a3599b0924ab4896af582d5aa2a55cdd2fd1;hpb=9169cee9ec0f231b3117a0d5a7840d2067f29610;p=m6w6%2Flibmemcached diff --git a/tests/libmemcached-1.0/touch.cc b/tests/libmemcached-1.0/touch.cc index 50e6a359..07f0096f 100644 --- a/tests/libmemcached-1.0/touch.cc +++ b/tests/libmemcached-1.0/touch.cc @@ -63,20 +63,20 @@ test_return_t test_memcached_touch(memcached_st *memc) memcached_return rc; test_null(memcached_get(memc, - test_literal_param("touchkey"), + test_literal_param(__func__), &len, &flags, &rc)); test_zero(len); test_compare(MEMCACHED_NOTFOUND, rc); test_compare(MEMCACHED_SUCCESS, memcached_set(memc, - test_literal_param("touchkey"), + test_literal_param(__func__), test_literal_param("touchval"), 2, 0)); { char *value= memcached_get(memc, - test_literal_param("touchkey"), + test_literal_param(__func__), &len, &flags, &rc); test_compare(8U, test_literal_param_size("touchval")); test_true(value); @@ -86,15 +86,15 @@ test_return_t test_memcached_touch(memcached_st *memc) } test_compare(MEMCACHED_SUCCESS, - memcached_touch(memc, test_literal_param("touchkey"), 60 *60)); + memcached_touch(memc, test_literal_param(__func__), 60 *60)); test_skip(false ,memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL)); - rc= memcached_touch(memc, test_literal_param("touchkey"), 60 *60 *24 *60); - test_compare_hint(MEMCACHED_SUCCESS, rc, memcached_last_error_message(memc)); + rc= memcached_touch(memc, test_literal_param(__func__), 60 *60 *24 *60); + test_compare(MEMCACHED_SUCCESS, rc); test_compare(MEMCACHED_NOTFOUND, - memcached_exist(memc, test_literal_param("touchkey"))); + memcached_exist(memc, test_literal_param(__func__))); return TEST_SUCCESS; } @@ -110,7 +110,7 @@ test_return_t test_memcached_touch_by_key(memcached_st *memc) test_null(memcached_get_by_key(memc, test_literal_param("grouping_key"), - test_literal_param("touchkey"), + test_literal_param(__func__), &len, &flags, &rc)); test_zero(len); test_compare(MEMCACHED_NOTFOUND, rc); @@ -118,14 +118,14 @@ test_return_t test_memcached_touch_by_key(memcached_st *memc) test_compare(MEMCACHED_SUCCESS, memcached_set_by_key(memc, test_literal_param("grouping_key"), - test_literal_param("touchkey"), + test_literal_param(__func__), test_literal_param("touchval"), 2, 0)); { char *value= memcached_get_by_key(memc, test_literal_param("grouping_key"), - test_literal_param("touchkey"), + test_literal_param(__func__), &len, &flags, &rc); test_compare(8U, test_literal_param_size("touchval")); test_true(value); @@ -137,17 +137,17 @@ test_return_t test_memcached_touch_by_key(memcached_st *memc) test_compare(MEMCACHED_SUCCESS, memcached_touch_by_key(memc, test_literal_param("grouping_key"), - test_literal_param("touchkey"), + test_literal_param(__func__), 60 *60)); test_skip(false ,memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL)); test_compare(MEMCACHED_SUCCESS, memcached_touch_by_key(memc, test_literal_param("grouping_key"), - test_literal_param("touchkey"), + test_literal_param(__func__), 60 *60 *24 *60)); test_compare(MEMCACHED_NOTFOUND, - memcached_exist_by_key(memc, test_literal_param("grouping_key"),test_literal_param("touchkey"))); + memcached_exist_by_key(memc, test_literal_param("grouping_key"),test_literal_param(__func__))); return TEST_SUCCESS; }