#include #include #include #include #include "memory.h" #include "fifo.h" int verbose; void test_fifo_create() { int r; FIFO f; f = 0; r = toku_fifo_create(&f); assert(r == 0); assert(f != 0); toku_fifo_free(&f); assert(f == 0); } void test_fifo_enq(int n) { int r; FIFO f; f = 0; r = toku_fifo_create(&f); assert(r == 0); assert(f != 0); char *thekey = 0; int thekeylen; char *theval = 0; int thevallen; void buildkey(int len) { thekeylen = len; thekey = realloc(thekey, thekeylen); memset(thekey, len, thekeylen); } void buildval(int len) { thevallen = len+1; theval = realloc(theval, thevallen); memset(theval, ~len, thevallen); } int i; for (i=0; i