X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fmem_functions.c;h=96d0ac20c8d9f41324bbac9af4d18786ed1e1b61;hb=de161b27e5e394ea0ae4a88e58fc9ebb21e821d0;hp=e3f6426a9ecd692352a97d809451e703b6b3ea96;hpb=e8b6a3ed21315eccd4123c6eb4124fc9fbdacd36;p=m6w6%2Flibmemcached diff --git a/tests/mem_functions.c b/tests/mem_functions.c index e3f6426a..96d0ac20 100644 --- a/tests/mem_functions.c +++ b/tests/mem_functions.c @@ -405,7 +405,7 @@ static test_return_t error_test(memcached_st *memc) 54481931U, 4186304426U, 1741088401U, 2979625118U, 4159057246U, 3425930182U, 2593724503U, 1868899624U, 1769812374U, 2302537950U, 1110330676U, 3365377466U, - 1336171666U, 3365377466U }; + 1336171666U, 3021258493U, 3365377466U }; // You have updated the memcache_error messages but not updated docs/tests. for (rc= MEMCACHED_SUCCESS; rc < MEMCACHED_MAXIMUM_RETURN; rc++) @@ -421,7 +421,7 @@ static test_return_t error_test(memcached_st *memc) } test_true(values[rc] == hash_val); } - test_true(MEMCACHED_MAXIMUM_RETURN == 45); + test_true(MEMCACHED_MAXIMUM_RETURN == 46); return TEST_SUCCESS; } @@ -2000,21 +2000,15 @@ static test_return_t MEMCACHED_BEHAVIOR_CORK_test(memcached_st *memc) { memcached_return_t rc; bool set= true; - bool value; rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_CORK, set); - test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_NOT_SUPPORTED); + test_true(rc == MEMCACHED_DEPRECATED); - value= (bool)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_CORK); - - if (rc == MEMCACHED_SUCCESS) - { - test_true((bool)value == set); - } - else - { - test_false((bool)value == set); - } + // Platform dependent +#if 0 + bool value= (bool)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_CORK); + test_false(value); +#endif return TEST_SUCCESS; } @@ -5752,7 +5746,7 @@ static test_return_t regression_bug_583031(memcached_st *unused) (void)memcached_get(memc, "dsf", 3, &length, &flags, &rc); - test_true_got(rc == MEMCACHED_TIMEOUT || rc == MEMCACHED_ERRNO, memcached_strerror(memc, rc)); + test_true_got(rc == MEMCACHED_TIMEOUT || rc == MEMCACHED_ERRNO || rc == MEMCACHED_FAILURE, memcached_strerror(memc, rc)); memcached_free(memc); @@ -6225,7 +6219,8 @@ test_st parser_tests[] ={ {"randomly generated options", 0, (test_callback_fn)random_statement_build_test }, {"prefix_key", 0, (test_callback_fn)parser_key_prefix_test }, {"server", 0, (test_callback_fn)server_test }, - {"servers", 0, (test_callback_fn)servers_test }, + {"bad server strings", 0, (test_callback_fn)servers_bad_test }, + {"server with weights", 0, (test_callback_fn)server_with_weight_test }, {0, 0, (test_callback_fn)0} };