1.1 --- a/test/list_tests.c Thu Oct 11 16:29:30 2012 +0200 1.2 +++ b/test/list_tests.c Fri Oct 12 10:54:55 2012 +0200 1.3 @@ -7,11 +7,13 @@ 1.4 UCX_TEST_IMPLEMENT(test_ucx_list_append) { 1.5 UcxList *list = ucx_list_append(NULL, "Hello"); 1.6 UCX_TEST_BEGIN 1.7 - UCX_TEST_ASSERT(strncmp(list->data, "Hello", 5) == 0, "failed"); 1.8 + UCX_TEST_ASSERT(strncmp((const char*)list->data, "Hello", 5) == 0, 1.9 + "failed"); 1.10 1.11 list = ucx_list_append(list, " World!"); 1.12 1.13 - UCX_TEST_ASSERT(strncmp(list->next->data, " World!", 7) == 0, "failed"); 1.14 + UCX_TEST_ASSERT(strncmp((const char*)list->next->data, " World!", 7) == 0, 1.15 + "failed"); 1.16 UCX_TEST_ASSERT(list->next->next == NULL, "failed"); 1.17 1.18 UCX_TEST_END 1.19 @@ -23,8 +25,10 @@ 1.20 UCX_TEST_BEGIN 1.21 list = ucx_list_prepend(list, "Hello"); 1.22 1.23 - UCX_TEST_ASSERT(strncmp(list->data, "Hello", 5) == 0, "failed"); 1.24 - UCX_TEST_ASSERT(strncmp(list->next->data, " World!", 7) == 0, "failed"); 1.25 + UCX_TEST_ASSERT(strncmp((const char*)list->data, "Hello", 5) == 0, 1.26 + "failed"); 1.27 + UCX_TEST_ASSERT(strncmp((const char*)list->next->data, " World!", 7) == 0, 1.28 + "failed"); 1.29 UCX_TEST_ASSERT(list->next->next == NULL, "failed"); 1.30 1.31 UCX_TEST_END 1.32 @@ -56,8 +60,10 @@ 1.33 list = ucx_list_concat(list, list2); 1.34 UCX_TEST_BEGIN 1.35 1.36 - UCX_TEST_ASSERT(strncmp(list->data, "Hello", 5) == 0, "failed"); 1.37 - UCX_TEST_ASSERT(strncmp(list->next->data, " World!", 7) == 0, "failed"); 1.38 + UCX_TEST_ASSERT(strncmp((const char*)list->data, "Hello", 5) == 0, 1.39 + "failed"); 1.40 + UCX_TEST_ASSERT(strncmp((const char*)list->next->data, " World!", 7) == 0, 1.41 + "failed"); 1.42 UCX_TEST_ASSERT(list->next->next == NULL, "failed"); 1.43 1.44 UCX_TEST_END 1.45 @@ -87,7 +93,7 @@ 1.46 list = ucx_list_append(list, "the "); 1.47 list = ucx_list_append(list, "last!"); 1.48 1.49 - char* last = (char*) (ucx_list_last(list)->data); 1.50 + const char* last = (const char*) (ucx_list_last(list)->data); 1.51 1.52 UCX_TEST_ASSERT(strncmp(last, "last!", 5) == 0, "failed"); 1.53 1.54 @@ -102,7 +108,7 @@ 1.55 list = ucx_list_append(list, "the "); 1.56 list = ucx_list_append(list, "mid!"); 1.57 1.58 - char* mid = (char*) (ucx_list_get(list, 1)->data); 1.59 + const char* mid = (const char*) (ucx_list_get(list, 1)->data); 1.60 1.61 UCX_TEST_ASSERT(strncmp(mid, "the ", 4) == 0, "failed"); 1.62 1.63 @@ -118,8 +124,10 @@ 1.64 1.65 list = ucx_list_remove(list, ucx_list_get(list, 1)); 1.66 1.67 - UCX_TEST_ASSERT(strncmp(list->data, "Hello", 5) == 0, "failed"); 1.68 - UCX_TEST_ASSERT(strncmp(list->next->data, " World!", 7) == 0, "failed"); 1.69 + UCX_TEST_ASSERT(strncmp((const char*)list->data, "Hello", 5) == 0, 1.70 + "failed"); 1.71 + UCX_TEST_ASSERT(strncmp((const char*)list->next->data, " World!", 7) == 0, 1.72 + "failed"); 1.73 UCX_TEST_ASSERT(list->next->next == NULL, "failed"); 1.74 UCX_TEST_END 1.75