test/map_tests.c

changeset 71
303dabadff1c
parent 69
fb59270b1de3
child 76
655020a30e77
     1.1 --- a/test/map_tests.c	Fri Oct 12 10:54:55 2012 +0200
     1.2 +++ b/test/map_tests.c	Fri Oct 12 12:08:34 2012 +0200
     1.3 @@ -15,7 +15,7 @@
     1.4  }
     1.5  
     1.6  UCX_TEST_IMPLEMENT(test_ucx_key) {
     1.7 -    UcxKey key = ucx_key("This is a text.", 15);
     1.8 +    UcxKey key = ucx_key((void*)"This is a text.", 15);
     1.9      UCX_TEST_BEGIN
    1.10      UCX_TEST_ASSERT(strncmp((const char*)key.data, "This is a text.", 15) == 0,
    1.11              "failed");
    1.12 @@ -194,12 +194,12 @@
    1.13  UCX_TEST_IMPLEMENT(test_ucx_map_store_load) {
    1.14      UcxMap *map = ucx_map_new(4);
    1.15  
    1.16 -    ucx_map_cstr_put(map, "test", "test");
    1.17 -    ucx_map_cstr_put(map, "key", "value");
    1.18 -    ucx_map_cstr_put(map, "other.very.long.key", "value");
    1.19 -    ucx_map_cstr_put(map, "testkey", "testvalue");
    1.20 -    ucx_map_cstr_put(map, "simple", "not a key but an extremely long value "
    1.21 -            "to test if the buffer extension works as designed");
    1.22 +    ucx_map_cstr_put(map, "test", (void*)"test");
    1.23 +    ucx_map_cstr_put(map, "key", (void*)"value");
    1.24 +    ucx_map_cstr_put(map, "other.very.long.key", (void*)"value");
    1.25 +    ucx_map_cstr_put(map, "testkey", (void*)"testvalue");
    1.26 +    ucx_map_cstr_put(map, "simple", (void*)"not a key but an extremely long "
    1.27 +            "value to test if the buffer extension works as designed");
    1.28  
    1.29      UCX_TEST_BEGIN
    1.30      FILE *f = tmpfile();
    1.31 @@ -259,10 +259,10 @@
    1.32  UCX_TEST_IMPLEMENT(test_ucx_map_store_load_with_mempool) {
    1.33      UcxMap *map = ucx_map_new(4);
    1.34  
    1.35 -    ucx_map_cstr_put(map, "test", "test");
    1.36 -    ucx_map_cstr_put(map, "key", "value");
    1.37 -    ucx_map_cstr_put(map, "testkey", "testvalue");
    1.38 -    ucx_map_cstr_put(map, "simple", "a simple value");
    1.39 +    ucx_map_cstr_put(map, "test", (void*)"test");
    1.40 +    ucx_map_cstr_put(map, "key", (void*)"value");
    1.41 +    ucx_map_cstr_put(map, "testkey", (void*)"testvalue");
    1.42 +    ucx_map_cstr_put(map, "simple", (void*)"a simple value");
    1.43  
    1.44      UCX_TEST_BEGIN
    1.45      FILE *f = tmpfile();
    1.46 @@ -297,9 +297,9 @@
    1.47  UCX_TEST_IMPLEMENT(test_ucx_map_clone) {
    1.48      UcxMap *map = ucx_map_new(4);
    1.49      
    1.50 -    ucx_map_cstr_put(map, "key1", "value1");
    1.51 -    ucx_map_cstr_put(map, "key2", "value2");
    1.52 -    ucx_map_cstr_put(map, "key3", "value3");
    1.53 +    ucx_map_cstr_put(map, "key1", (void*)"value1");
    1.54 +    ucx_map_cstr_put(map, "key2", (void*)"value2");
    1.55 +    ucx_map_cstr_put(map, "key3", (void*)"value3");
    1.56      
    1.57      UcxMap *clone = ucx_map_clone(map, NULL, NULL);
    1.58      

mercurial