void test_basic_skiplist() { test_basic(skiplist_dict_new(dict_str_cmp, NULL, 13), keys1, NKEYS1, closest_lookup_infos, NUM_CLOSEST_LOOKUP_INFOS); test_basic(skiplist_dict_new(dict_str_cmp, NULL, 13), keys2, NKEYS2, closest_lookup_infos, NUM_CLOSEST_LOOKUP_INFOS); }
void test_basic_skiplist() { test_basic(skiplist_dict_new(dict_str_cmp, NULL, 13), keys1, NKEYS1, cl_infos, N_CL_INFOS); test_basic(skiplist_dict_new(dict_str_cmp, NULL, 13), keys2, NKEYS2, cl_infos, N_CL_INFOS); }
dict * create_dictionary(char type, const char **container_name) { dict_compare_func cmp_func = my_strcmp; dict_hash_func hash_func = str_hash; switch (type) { case 'h': *container_name = "hb"; return hb_dict_new(cmp_func, key_str_free); case 'p': *container_name = "pr"; return pr_dict_new(cmp_func, key_str_free); case 'r': *container_name = "rb"; return rb_dict_new(cmp_func, key_str_free); case 't': *container_name = "tr"; return tr_dict_new(cmp_func, NULL, key_str_free); case 's': *container_name = "sp"; return sp_dict_new(cmp_func, key_str_free); case 'S': *container_name = "sk"; return skiplist_dict_new(cmp_func, key_str_free, 12); case 'w': *container_name = "wb"; return wb_dict_new(cmp_func, key_str_free); case 'H': *container_name = "ht"; return hashtable_dict_new(cmp_func, hash_func, key_str_free, HASHTABLE_SIZE); case '2': *container_name = "h2"; return hashtable2_dict_new(cmp_func, hash_func, key_str_free, HASHTABLE_SIZE); default: quit("type must be one of h, p, r, t, s, w or H"); } }
void test_basic_skiplist() { test_basic(skiplist_dict_new(dict_str_cmp, NULL, 13), keys1, NKEYS1); test_basic(skiplist_dict_new(dict_str_cmp, NULL, 13), keys2, NKEYS2); }