static ulong fill(HHSet *S) { ulong m = 0; for (ulong i = 0; i < 128; ++i) { ulong y = rand() + 1; if (!hhsetget(S, y)) { test(hhsetput(S, y)); ++m; } test(hhsetget(S, x)); } return m; }
static uint fill(HHSet *S) { uint m = 0; for(uint i = 0; i < 128; ++i){ uint y = rand()+1; if(!hhsetget(S,y)){ test(hhsetput(S,y)); ++m; } test(hhsetget(S,x)); } return m; }
int main(void) { uint n = 16; uint m = 0; HHSet *S = hhsetnew(n,NULL,NULL); for(uint i = 0; i < 30; ++i){ uint x = rand()+1; if(!hhsetget(S,x)){ test(hhsetput(S,x)); ++m; } } test(S->T->m == m); hhsetfree(S); return 0; }