X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ucw%2Fhash-test.c;h=157088284bc92a4bc768d3b4cab359e5ad8e20c7;hb=959566090f98dd31eaa67d3d5959b641e5fe902b;hp=1f7aa71186585077e634a2387a4ff98916056f47;hpb=031256ad2e123eec58521f8e3eb9496c197641d2;p=libucw.git diff --git a/ucw/hash-test.c b/ucw/hash-test.c index 1f7aa711..15708828 100644 --- a/ucw/hash-test.c +++ b/ucw/hash-test.c @@ -1,7 +1,7 @@ /* Tests for hash table routines */ -#include "ucw/lib.h" -#include "ucw/mempool.h" +#include +#include #include #include @@ -30,7 +30,7 @@ static inline void test1_init_data(struct node1 *n) #define HASH_WANT_LOOKUP #define HASH_WANT_REMOVE -#include "ucw/hashtable.h" +#include static void test1(void) { @@ -79,7 +79,7 @@ struct node2 { #define HASH_WANT_FIND #define HASH_WANT_NEW -#include "ucw/hashtable.h" +#include static void test2(void) { @@ -122,7 +122,7 @@ struct node3 { #define HASH_USE_POOL pool3 -#include "ucw/hashtable.h" +#include static void test3(void) { @@ -150,7 +150,7 @@ static void test3(void) /* TEST 4: complex keys */ -#include "ucw/hashfunc.h" +#include struct node4 { int port; @@ -171,7 +171,7 @@ struct node4 { #define HASH_WANT_REMOVE #define HASH_GIVE_HASHFN -static uns test4_hash(char *host, int port) +static uint test4_hash(char *host, int port) { return hash_string_nocase(host) ^ hash_u32(port); } @@ -183,7 +183,7 @@ static inline int test4_eq(char *host1, int port1, char *host2, int port2) } #define HASH_GIVE_EXTRA_SIZE -static inline uns test4_extra_size(char *host, int port UNUSED) +static inline uint test4_extra_size(char *host, int port UNUSED) { return strlen(host); } @@ -195,7 +195,7 @@ static inline void test4_init_key(struct node4 *n, char *host, int port) n->port = port; } -#include "ucw/hashtable.h" +#include static void test4(void) { @@ -266,7 +266,7 @@ static inline void test5_init_data(struct test5_table *table UNUSED, struct node #define HASH_WANT_NEW #define HASH_WANT_DELETE -#include "ucw/hashtable.h" +#include static void test5(void) { @@ -298,7 +298,7 @@ static void test5(void) int main(int argc, char **argv) { - uns m = ~0U; + uint m = ~0U; if (argc > 1) { m = 0;