]> pd.if.org Git - nbds/blobdiff - test/map_test1.c
all structures are parameterized by the datatype for the key
[nbds] / test / map_test1.c
index 34d4ba74f17bb3aed31b00a089a2c6ddd546fa99..7c35b4592e9959acda072443a25135a13894032b 100644 (file)
@@ -10,7 +10,7 @@
 
 #define NUM_ITERATIONS 10000000
 
-//#define TEST_STRING_KEYS
+#define TEST_STRING_KEYS
 
 static volatile int wait_;
 static long num_threads_;
@@ -85,9 +85,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;