X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fstr-test.c;h=e289258a143ab0e1c4950bb66ce28a92830ed9b9;hb=9ff2d1d3d98e39cfe57e38519427a7754d73cb6c;hp=16cd92918a5e23e9ab6412cf7757b671e21dafe1;hpb=603b9b2bce1af062e13b85c0d072f7f9894642c7;p=libucw.git diff --git a/lib/str-test.c b/lib/str-test.c index 16cd9291..e289258a 100644 --- a/lib/str-test.c +++ b/lib/str-test.c @@ -1,9 +1,9 @@ /* - * Checking the correctness of str_len() and str_hash() and proving, that + * Checking the correctness of str_len() and hash_*() and proving, that * it is faster than the classical version ;-) */ -#include "lib/str_hash.h" +#include "lib/hashfunc.h" #include #include @@ -17,7 +17,7 @@ static uns alignment = 0; static void -random_string(char *str, int len) +random_string(byte *str, int len) { int i; for (i=0; i= 0; i++) { - char str[lengths[i] + 1 + alignment]; + byte str[lengths[i] + 1 + alignment]; uns count = TEST_TIME / (lengths[i] + 10); - uns el1 = 0, el2 = 0, elh = 0; - uns tot1 = 0, tot2 = 0, hash = 0; + uns el1 = 0, el2 = 0, elh = 0, elhn = 0; + uns tot1 = 0, tot2 = 0, hash = 0, hashn = 0; uns j; for (j=0; j