X-Git-Url: https://pd.if.org/git/?p=nbds;a=blobdiff_plain;f=test%2Fmap_test1.c;h=27226d6bb2a52dbe0396869f255ca36ba22e885b;hp=34d4ba74f17bb3aed31b00a089a2c6ddd546fa99;hb=d26bac75802a324ed98c8d3d88cfb9eb87b3b35a;hpb=f1098084dd54496a61f9a254541190df77edd166 diff --git a/test/map_test1.c b/test/map_test1.c index 34d4ba7..27226d6 100644 --- a/test/map_test1.c +++ b/test/map_test1.c @@ -7,10 +7,13 @@ #include "nstring.h" #include "runtime.h" #include "map.h" +#include "list.h" +#include "skiplist.h" +#include "hashtable.h" #define NUM_ITERATIONS 10000000 -//#define TEST_STRING_KEYS +#define TEST_STRING_KEYS static volatile int wait_; static long num_threads_; @@ -85,9 +88,9 @@ int main (int argc, char **argv) { map_type_t map_types[] = { MAP_TYPE_LIST, MAP_TYPE_SKIPLIST, MAP_TYPE_HASHTABLE }; for (int i = 0; i < sizeof(map_types)/sizeof(*map_types); ++i) { #ifdef TEST_STRING_KEYS - map_ = map_alloc(map_types[i], (cmp_fun_t)ns_cmp, (hash_fun_t)ns_hash, (clone_fun_t)ns_dup); + map_ = map_alloc(map_types[i], &DATATYPE_NSTRING); #else - map_ = map_alloc(map_types[i], NULL, NULL, NULL); + map_ = map_alloc(map_types[i], NULL); #endif struct timeval tv1, tv2;