Update test
authorBrian Aker <brian@tangent.org>
Sat, 18 Feb 2012 02:40:33 +0000 (18:40 -0800)
committerBrian Aker <brian@tangent.org>
Sat, 18 Feb 2012 02:40:33 +0000 (18:40 -0800)
tests/libmemcached-1.0/all_tests.h
tests/libmemcached-1.0/mem_functions.cc

index c9134a519c9c3769765e50a03f488ab3644d34fd..47db429d85e2b09112debd455d7d6d91d381ea92 100644 (file)
@@ -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 },
index 3a42c3e4708cfefda26cd9da981e9be19da348bd..3fcba9958fa3b0fc42c69f6671cad28310993977 100644 (file)
@@ -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);