X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Flibmemcached-1.0%2Fmem_functions.cc;h=49be55da94aa8cee4e5f51d185d5d11482406456;hb=9d64a2dd252e2a8e0aa22706323755316831d98a;hp=38c0db77e88a90e967128531b273ec0387f3b646;hpb=d4c8a38faeda1342d57c2ba74e073d6a2899e558;p=m6w6%2Flibmemcached diff --git a/tests/libmemcached-1.0/mem_functions.cc b/tests/libmemcached-1.0/mem_functions.cc index 38c0db77..49be55da 100644 --- a/tests/libmemcached-1.0/mem_functions.cc +++ b/tests/libmemcached-1.0/mem_functions.cc @@ -823,6 +823,34 @@ test_return_t memcached_add_SUCCESS_TEST(memcached_st *memc) return TEST_SUCCESS; } +test_return_t regression_1067242_TEST(memcached_st *memc) +{ + test_compare(MEMCACHED_SUCCESS, memcached_set(memc, + test_literal_param(__func__), + test_literal_param("-2"), + 0, 0)); + + memcached_return_t rc; + char* value; + test_true((value= memcached_get(memc, test_literal_param(__func__), NULL, NULL, &rc))); + test_compare(MEMCACHED_SUCCESS, rc); + free(value); + + for (size_t x= 0; x < 10; x++) + { + uint64_t new_number; + test_compare(MEMCACHED_CLIENT_ERROR, + memcached_increment(memc, + test_literal_param(__func__), 1, &new_number)); + test_compare(MEMCACHED_CLIENT_ERROR, memcached_last_error(memc)); + test_true((value= memcached_get(memc, test_literal_param(__func__), NULL, NULL, &rc))); + test_compare(MEMCACHED_SUCCESS, rc); + free(value); + } + + return TEST_SUCCESS; +} + /* Set the value, then quit to make sure it is flushed. Come back in and test that add fails. @@ -3655,6 +3683,27 @@ test_return_t murmur_run (memcached_st *) #endif } +test_return_t murmur3_TEST(hashkit_st *) +{ + test_skip(true, libhashkit_has_algorithm(HASHKIT_HASH_MURMUR3)); + +#ifdef WORDS_BIGENDIAN + (void)murmur3_values; + return TEST_SKIPPED; +#else + uint32_t x; + const char **ptr; + + for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++) + { + test_compare(murmur3_values[x], + memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_MURMUR3)); + } + + return TEST_SUCCESS; +#endif +} + test_return_t jenkins_run (memcached_st *) { uint32_t x;