X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fhashkit_functions.c;h=0f2c42a99d050cd3c20954cb6d77cf6058274b03;hb=349ca737f30ff0b6c3c71034f0930660663fa360;hp=53c94b59c3eb3dbde9313d97da396039b16fc91e;hpb=6c2bd52dfa24287c856b0b679270b7f7681333a5;p=m6w6%2Flibmemcached diff --git a/tests/hashkit_functions.c b/tests/hashkit_functions.c index 53c94b59..0f2c42a9 100644 --- a/tests/hashkit_functions.c +++ b/tests/hashkit_functions.c @@ -15,7 +15,7 @@ #include -#include "test.h" +#include #include "hash_results.h" @@ -262,6 +262,7 @@ static test_return_t murmur_run (hashkit_st *hashk) (void)hashk; #ifdef WORDS_BIGENDIAN + (void)murmur_values; return TEST_SKIPPED; #else uint32_t x; @@ -271,7 +272,11 @@ static test_return_t murmur_run (hashkit_st *hashk) { uint32_t hash_val; +#ifdef HAVE_MURMUR_HASH hash_val= libhashkit_murmur(*ptr, strlen(*ptr)); +#else + hash_val= 1; +#endif assert(murmur_values[x] == hash_val); } @@ -330,8 +335,15 @@ static test_return_t hashkit_set_function_test(hashkit_st *hashk) rc= hashkit_set_function(hashk, algo); /* Hsieh is disabled most of the time for patent issues */ +#ifndef HAVE_HSIEH_HASH if (rc == HASHKIT_FAILURE && algo == HASHKIT_HASH_HSIEH) continue; +#endif + +#ifndef HAVE_MURMUR_HASH + if (rc == HASHKIT_FAILURE && algo == HASHKIT_HASH_MURMUR) + continue; +#endif if (rc == HASHKIT_FAILURE && algo == HASHKIT_HASH_CUSTOM) continue;