X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fhash_plus.cc;h=8675adef12a6e50afdeb06a7c6c8614d9470c38a;hb=5dcfd8799e2ab7d60b8d3b352474d43556d37dcf;hp=3d2545ab66e9987dcad260ddc74468459b57bc8b;hpb=65580ac6cb193fd73e12117c1ba492c57c3d0be4;p=awesomized%2Flibmemcached diff --git a/tests/hash_plus.cc b/tests/hash_plus.cc index 3d2545ab..8675adef 100644 --- a/tests/hash_plus.cc +++ b/tests/hash_plus.cc @@ -2,7 +2,7 @@ C++ to libhashkit */ -#include +#include #include @@ -10,11 +10,11 @@ #include #include -#include +#include using namespace libtest; -#include "hash_results.h" +#include "tests/hash_results.h" static test_return_t exists_test(void *) { @@ -130,6 +130,12 @@ static test_return_t set_function_test(void *) list= hsieh_values; break; + case HASHKIT_HASH_MURMUR3: +#ifdef WORDS_BIGENDIAN + continue; +#endif + list= murmur3_values; + break; case HASHKIT_HASH_MURMUR: #ifdef WORDS_BIGENDIAN continue; @@ -158,7 +164,7 @@ static test_return_t set_function_test(void *) hash_val= hashk.digest(*ptr, strlen(*ptr)); char buffer[1024]; snprintf(buffer, sizeof(buffer), "%lu %lus %s", (unsigned long)list[x], (unsigned long)hash_val, libhashkit_string_hash(*algo)); - test_true_got(list[x] == hash_val, buffer); + test_compare(list[x], hash_val); } } @@ -171,7 +177,7 @@ static test_return_t set_distribution_function_test(void *) hashkit_return_t rc; rc= hashk.set_distribution_function(HASHKIT_HASH_CUSTOM); - test_true_got(rc == HASHKIT_FAILURE or rc == HASHKIT_INVALID_ARGUMENT, hashkit_strerror(NULL, rc)); + test_true(rc == HASHKIT_FAILURE or rc == HASHKIT_INVALID_ARGUMENT); test_compare(HASHKIT_SUCCESS, hashk.set_distribution_function(HASHKIT_HASH_JENKINS)); @@ -213,7 +219,7 @@ collection_st collection[] ={ {0, 0, 0, 0} }; -void get_world(Framework *world) +void get_world(libtest::Framework* world) { - world->collections= collection; + world->collections(collection); }