Merge of build trunk
[awesomized/libmemcached] / tests / libmemcached-1.0 / mem_functions.cc
index a9933f6faf112c9b4311819a774558206b4d0900..ac88ee50fbde9a10d3e7adc89439af93d59b67d3 100644 (file)
@@ -78,6 +78,7 @@
 #include "tests/ketama.h"
 #include "tests/namespace.h"
 #include "tests/parser.h"
+#include "tests/libmemcached-1.0/dump.h"
 #include "tests/touch.h"
 #include "tests/callbacks.h"
 #include "tests/pool.h"
@@ -465,7 +466,7 @@ static test_return_t libmemcached_string_behavior_test(memcached_st *)
   {
     test_true(libmemcached_string_behavior(memcached_behavior_t(x)));
   }
-  test_compare(36, int(MEMCACHED_BEHAVIOR_MAX));
+  test_compare(37, int(MEMCACHED_BEHAVIOR_MAX));
 
   return TEST_SUCCESS;
 }
@@ -2119,12 +2120,13 @@ static test_return_t fetch_all_results(memcached_st *memc, unsigned int &keys_re
 {
   keys_returned= 0;
 
-  memcached_result_st* result;
-  while ((result= memcached_fetch_result(memc, NULL, &rc)))
+  memcached_result_st* result= NULL;
+  while ((result= memcached_fetch_result(memc, result, &rc)))
   {
     test_compare(MEMCACHED_SUCCESS, rc);
     keys_returned+= 1;
   }
+  memcached_result_free(result);
 
   return TEST_SUCCESS;
 }
@@ -3120,7 +3122,7 @@ static test_return_t generate_data(memcached_st *memc)
 {
   unsigned int check_execute= execute_set(memc, global_pairs, global_count);
 
-  test_compare(global_count, check_execute);
+  test_compare_warn_hint(global_count, check_execute, "Possible false, positive, memcached may have ejected key/value based on memory needs");
 
   return TEST_SUCCESS;
 }
@@ -5663,6 +5665,7 @@ test_st tests[] ={
   {"memcached_exist_by_key(MEMCACHED_SUCCESS)", true, (test_callback_fn*)memcached_exist_by_key_SUCCESS },
   {"memcached_touch", 0, (test_callback_fn*)test_memcached_touch},
   {"memcached_touch_with_prefix", 0, (test_callback_fn*)test_memcached_touch_by_key},
+  {"memcached_dump()", 0, (test_callback_fn*)memcached_dump_TEST },
   {0, 0, 0}
 };