X-Git-Url: https://pd.if.org/git/?p=nbds;a=blobdiff_plain;f=test%2Fmap_test2.c;h=51b17b3f10cbf7f75eabdb8cbc7ea1260198f216;hp=92a269ec4f81fdd699327e096aad2ed0e2048a60;hb=9d72edf41ce3a2ddbbe2d44afc23ef5ec53339c3;hpb=11572afcaf218cfcbb8e9747f22739f75252c4f4 diff --git a/test/map_test2.c b/test/map_test2.c index 92a269e..51b17b3 100644 --- a/test/map_test2.c +++ b/test/map_test2.c @@ -12,6 +12,9 @@ #include "runtime.h" #include "nstring.h" #include "map.h" +#include "list.h" +#include "skiplist.h" +#include "hashtable.h" #include "lwt.h" #define ASSERT_EQUAL(x, y) CuAssertIntEquals(tc, x, y) @@ -25,7 +28,7 @@ typedef struct worker_data { volatile int *wait; } worker_data_t; -static map_type_t map_type_; +static const map_impl_t *map_type_; // Test some basic stuff; add a few keys, remove a few keys void simple (CuTest* tc) { @@ -199,7 +202,7 @@ int main (void) { nbd_init(); lwt_set_trace_level("h3"); - map_type_t map_types[] = { MAP_TYPE_LIST, MAP_TYPE_SKIPLIST, MAP_TYPE_HASHTABLE }; + static const map_impl_t *map_types[] = { &ll_map_impl, &sl_map_impl, &ht_map_impl }; for (int i = 0; i < sizeof(map_types)/sizeof(*map_types); ++i) { map_type_ = map_types[i];