#include "tests.h" #include "../src/Hashtable/hash.h" #include "../src/Autoarr/Autoarr.h" #define AMOUNT_OF_TESTS 400000 char __buf[]="iojihiojopijiugbjmoihftytryfdrh"; #define test_hashfunc(hasht, hashf, tests_n)\ optime(#hashf,1,({\ printf("\e[94mfunction: \e[92m" #hashf "\n");\ printf("\e[94mhash of \"%s\": \e[92m%x\n",__buf, hashf(__buf,cptr_length(__buf)));\ Autoarr(hasht)* hashes=Autoarr_create(hasht,512,32768);\ uint32 collisions=0;\ for(uint32 i=0;i