X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fhash_plus.cc;h=e3130786f2606aa9844b8b0ec0fc9ff61df078f1;hb=50dc8599f105fe915607e6f2d57851fd9acad839;hp=20cf79db0f4e0a7fe1535decf03ac38e3106f84d;hpb=ae6bc7501efd5aeaaee92dabe2da0ec2d1625c5b;p=m6w6%2Flibmemcached diff --git a/tests/hash_plus.cc b/tests/hash_plus.cc index 20cf79db..e3130786 100644 --- a/tests/hash_plus.cc +++ b/tests/hash_plus.cc @@ -4,7 +4,7 @@ #include -#include +#include #include #include @@ -93,7 +93,7 @@ static test_return_t set_function_test(void *) { hashkit_return_t rc= hashk.set_function(*algo); - test_true(rc == HASHKIT_SUCCESS); + test_compare(HASHKIT_SUCCESS, rc); uint32_t *list; switch (*algo) @@ -101,30 +101,38 @@ static test_return_t set_function_test(void *) case HASHKIT_HASH_DEFAULT: list= one_at_a_time_values; break; + case HASHKIT_HASH_MD5: list= md5_values; break; + case HASHKIT_HASH_CRC: list= crc_values; break; + case HASHKIT_HASH_FNV1_64: list= fnv1_64_values; break; + case HASHKIT_HASH_FNV1A_64: list= fnv1a_64_values; break; + case HASHKIT_HASH_FNV1_32: list= fnv1_32_values; break; + case HASHKIT_HASH_FNV1A_32: list= fnv1a_32_values; break; + case HASHKIT_HASH_HSIEH: #ifndef HAVE_HSIEH_HASH continue; #endif list= hsieh_values; break; + case HASHKIT_HASH_MURMUR: #ifdef WORDS_BIGENDIAN continue; @@ -134,9 +142,11 @@ static test_return_t set_function_test(void *) #endif list= murmur_values; break; + case HASHKIT_HASH_JENKINS: list= jenkins_values; break; + case HASHKIT_HASH_CUSTOM: case HASHKIT_HASH_MAX: default: @@ -195,14 +205,14 @@ static test_return_t compare_function_test(void *obj) } test_st basic[] ={ - { "exists", 0, reinterpret_cast(exists_test) }, - { "new", 0, reinterpret_cast(new_test) }, - { "copy", 0, reinterpret_cast(copy_test) }, - { "assign", 0, reinterpret_cast(assign_test) }, - { "digest", 0, reinterpret_cast(digest_test) }, - { "set_function", 0, reinterpret_cast(set_function_test) }, - { "set_distribution_function", 0, reinterpret_cast(set_distribution_function_test) }, - { "compare", 0, reinterpret_cast(compare_function_test) }, + { "exists", 0, reinterpret_cast(exists_test) }, + { "new", 0, reinterpret_cast(new_test) }, + { "copy", 0, reinterpret_cast(copy_test) }, + { "assign", 0, reinterpret_cast(assign_test) }, + { "digest", 0, reinterpret_cast(digest_test) }, + { "set_function", 0, reinterpret_cast(set_function_test) }, + { "set_distribution_function", 0, reinterpret_cast(set_distribution_function_test) }, + { "compare", 0, reinterpret_cast(compare_function_test) }, { 0, 0, 0} }; @@ -211,7 +221,7 @@ collection_st collection[] ={ {0, 0, 0, 0} }; -void get_world(world_st *world) +void get_world(Framework *world) { world->collections= collection; }