summaryrefslogtreecommitdiff
path: root/tests/libmemcached-1.0/mem_functions.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libmemcached-1.0/mem_functions.cc')
-rw-r--r--tests/libmemcached-1.0/mem_functions.cc29
1 files changed, 16 insertions, 13 deletions
diff --git a/tests/libmemcached-1.0/mem_functions.cc b/tests/libmemcached-1.0/mem_functions.cc
index 49be55da..ae13bd1b 100644
--- a/tests/libmemcached-1.0/mem_functions.cc
+++ b/tests/libmemcached-1.0/mem_functions.cc
@@ -46,7 +46,7 @@
Test cases
*/
-#include <libmemcached-1.0/memcached.h>
+#include <libmemcached-1.2/memcached.h>
#include <libmemcached/is.h>
#include <libmemcached/server_instance.h>
@@ -76,7 +76,7 @@
using namespace libtest;
-#include <libmemcachedutil-1.0/util.h>
+#include <libmemcachedutil-1.2/util.h>
#include "tests/hash_results.h"
@@ -1875,7 +1875,7 @@ test_return_t add_host_test(memcached_st *memc)
test_return_t regression_1048945_TEST(memcached_st*)
{
- memcached_return status;
+ memcached_return_t status;
memcached_server_st* list= memcached_server_list_append_with_weight(NULL, "a", 11211, 0, &status);
test_compare(status, MEMCACHED_SUCCESS);
@@ -2609,6 +2609,7 @@ test_return_t user_supplied_bug16(memcached_st *memc)
/* Check the validity of chinese key*/
test_return_t user_supplied_bug17(memcached_st *memc)
{
+ test_compare(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_VERIFY_KEY, false), MEMCACHED_SUCCESS);
const char *key= "豆瓣";
const char *value="我们在炎热抑郁的夏天无法停止豆瓣";
memcached_return_t rc= memcached_set(memc, key, strlen(key),
@@ -3807,7 +3808,7 @@ test_return_t memcached_get_MEMCACHED_ERRNO(memcached_st *)
{
size_t len;
uint32_t flags;
- memcached_return rc;
+ memcached_return_t rc;
// Create a handle.
memcached_st *tl_memc_h= memcached(test_literal_param("--server=localhost:9898 --server=localhost:9899")); // This server should not exist
@@ -3833,7 +3834,7 @@ test_return_t memcached_get_MEMCACHED_NOTFOUND(memcached_st *memc)
{
size_t len;
uint32_t flags;
- memcached_return rc;
+ memcached_return_t rc;
// See if memcached is reachable.
char *value= memcached_get(memc,
@@ -3857,7 +3858,7 @@ test_return_t memcached_get_by_key_MEMCACHED_ERRNO(memcached_st *)
{
size_t len;
uint32_t flags;
- memcached_return rc;
+ memcached_return_t rc;
// Create a handle.
memcached_st *tl_memc_h= memcached_create(NULL);
@@ -3887,7 +3888,7 @@ test_return_t memcached_get_by_key_MEMCACHED_NOTFOUND(memcached_st *memc)
{
size_t len;
uint32_t flags;
- memcached_return rc;
+ memcached_return_t rc;
// See if memcached is reachable.
char *value= memcached_get_by_key(memc,
@@ -4039,6 +4040,7 @@ test_return_t regression_bug_442914(memcached_st *original_memc)
test_skip(original_memc->servers[0].type, MEMCACHED_CONNECTION_TCP);
memcached_st* memc= create_single_instance_memcached(original_memc, "--NOREPLY --TCP-NODELAY");
+ test_compare(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_VERIFY_KEY, false), MEMCACHED_SUCCESS);
for (uint32_t x= 0; x < 250; ++x)
{
@@ -4308,6 +4310,7 @@ test_return_t test_multiple_get_last_disconnect(memcached_st *)
memcached_st *memc= memcached(server_string, strlen(server_string));
test_true(memc);
+ test_compare(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_VERIFY_KEY, false), MEMCACHED_SUCCESS);
// We will just use the error strings as our keys
uint32_t counter= 100;
@@ -4446,7 +4449,7 @@ test_return_t wrong_failure_counter_two_test(memcached_st *memc)
/* Check if we still are connected */
uint32_t flags;
size_t string_length;
- memcached_return rc;
+ memcached_return_t rc;
char *string= memcached_get(memc, key, strlen(key),
&string_length, &flags, &rc);
@@ -4511,7 +4514,7 @@ test_return_t regression_bug_490486(memcached_st *original_memc)
char blob[1024]= { 0 };
for (size_t x= 0; x < keys.size(); ++x)
{
- memcached_return rc= memcached_set(memc,
+ memcached_return_t rc= memcached_set(memc,
keys.key_at(x), keys.length_at(x),
blob, sizeof(blob), 0, 0);
test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED); // MEMCACHED_TIMEOUT <-- hash been observed on OSX
@@ -4521,7 +4524,7 @@ test_return_t regression_bug_490486(memcached_st *original_memc)
/* Try to get all of them with a large multiget */
size_t counter= 0;
- memcached_execute_function callbacks[]= { &callback_counter };
+ memcached_execute_fn callbacks[]= { &callback_counter };
memcached_return_t rc= memcached_mget_execute(memc,
keys.keys_ptr(), keys.lengths_ptr(), keys.size(),
callbacks, &counter, 1);
@@ -4709,7 +4712,7 @@ test_return_t regression_bug_490520(memcached_st *original_memc)
char key[251];
int key_length= snprintf(key, sizeof(key), "0200%u", x);
- memcached_return rc= memcached_set(memc, key, key_length, blob, sizeof(blob), 0, 0);
+ memcached_return_t rc= memcached_set(memc, key, key_length, blob, sizeof(blob), 0, 0);
test_true_got(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED, memcached_last_error_message(memc));
}
@@ -4802,7 +4805,7 @@ test_return_t regression_bug_854604(memcached_st *)
return TEST_SUCCESS;
}
-static void die_message(memcached_st* mc, memcached_return error, const char* what, uint32_t it)
+static void die_message(memcached_st* mc, memcached_return_t error, const char* what, uint32_t it)
{
fprintf(stderr, "Iteration #%u: ", it);
@@ -4833,7 +4836,7 @@ test_return_t regression_bug_(memcached_st *memc)
for (uint32_t x= 0; x < TEST_CONSTANT_CREATION; x++)
{
memcached_st* mc= memcached_create(NULL);
- memcached_return rc;
+ memcached_return_t rc;
rc= memcached_behavior_set(mc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1);
if (rc != MEMCACHED_SUCCESS)