#include #include #include #include #include #include #include "test_hash.h" #define STRING_MAX_LENGTH 10 #define KEY_VALUE_NBR 20 static void get_key(const char *name, di_rstring *key) { size_t size; size = strlen (name); /* i know that is bad, but i know it is not written by the lookup */ key->string = (char *) name; key->size = size; } START_TEST(test_hash) { di_hash_table *table; int i,nbr_of_insert=20; char str[KEY_VALUE_NBR][STRING_MAX_LENGTH]; di_rstring key[KEY_VALUE_NBR]; table = di_hash_table_new(di_rstring_hash, di_rstring_equal); for (i=0;i