diff -r fb59270b1de3 -r 303dabadff1c test/list_tests.c --- a/test/list_tests.c Fri Oct 12 10:54:55 2012 +0200 +++ b/test/list_tests.c Fri Oct 12 12:08:34 2012 +0200 @@ -5,12 +5,12 @@ #include "list_tests.h" UCX_TEST_IMPLEMENT(test_ucx_list_append) { - UcxList *list = ucx_list_append(NULL, "Hello"); + UcxList *list = ucx_list_append(NULL, (void*)"Hello"); UCX_TEST_BEGIN UCX_TEST_ASSERT(strncmp((const char*)list->data, "Hello", 5) == 0, "failed"); - list = ucx_list_append(list, " World!"); + list = ucx_list_append(list, (void*)" World!"); UCX_TEST_ASSERT(strncmp((const char*)list->next->data, " World!", 7) == 0, "failed"); @@ -21,9 +21,9 @@ } UCX_TEST_IMPLEMENT(test_ucx_list_prepend) { - UcxList *list = ucx_list_prepend(NULL, " World!"); + UcxList *list = ucx_list_prepend(NULL, (void*)" World!"); UCX_TEST_BEGIN - list = ucx_list_prepend(list, "Hello"); + list = ucx_list_prepend(list, (void*)"Hello"); UCX_TEST_ASSERT(strncmp((const char*)list->data, "Hello", 5) == 0, "failed"); @@ -36,12 +36,12 @@ } UCX_TEST_IMPLEMENT(test_ucx_list_equals) { - UcxList *list = ucx_list_append(NULL, "Hello"); - list = ucx_list_append(list, " World!"); - UcxList *list2 = ucx_list_prepend(NULL, " World!"); - list2 = ucx_list_prepend(list2, "Hello"); - UcxList *list3 = ucx_list_prepend(NULL, " Welt!"); - list3 = ucx_list_prepend(list3, "Hallo"); + UcxList *list = ucx_list_append(NULL, (void*)"Hello"); + list = ucx_list_append(list, (void*)" World!"); + UcxList *list2 = ucx_list_prepend(NULL, (void*)" World!"); + list2 = ucx_list_prepend(list2, (void*)"Hello"); + UcxList *list3 = ucx_list_prepend(NULL, (void*)" Welt!"); + list3 = ucx_list_prepend(list3, (void*)"Hallo"); UCX_TEST_BEGIN UCX_TEST_ASSERT(ucx_list_equals(list, list2, cmp_string, NULL), "failed"); @@ -54,8 +54,8 @@ } UCX_TEST_IMPLEMENT(test_ucx_list_concat) { - UcxList *list = ucx_list_append(NULL, "Hello"); - UcxList *list2 = ucx_list_prepend(NULL, " World!"); + UcxList *list = ucx_list_append(NULL, (void*)"Hello"); + UcxList *list2 = ucx_list_prepend(NULL, (void*)" World!"); list = ucx_list_concat(list, list2); UCX_TEST_BEGIN @@ -74,12 +74,12 @@ } UCX_TEST_IMPLEMENT(test_ucx_list_size) { - UcxList *list = ucx_list_append(NULL, "This "); + UcxList *list = ucx_list_append(NULL, (void*)"This "); UCX_TEST_BEGIN - list = ucx_list_append(list, "list "); - list = ucx_list_append(list, "has "); - list = ucx_list_append(list, "size "); - list = ucx_list_append(list, "5!"); + list = ucx_list_append(list, (void*)"list "); + list = ucx_list_append(list, (void*)"has "); + list = ucx_list_append(list, (void*)"size "); + list = ucx_list_append(list, (void*)"5!"); UCX_TEST_ASSERT(ucx_list_size(list) == 5, "failed"); @@ -88,10 +88,10 @@ } UCX_TEST_IMPLEMENT(test_ucx_list_last) { - UcxList *list = ucx_list_append(NULL, "Find "); + UcxList *list = ucx_list_append(NULL, (void*)"Find "); UCX_TEST_BEGIN - list = ucx_list_append(list, "the "); - list = ucx_list_append(list, "last!"); + list = ucx_list_append(list, (void*)"the "); + list = ucx_list_append(list, (void*)"last!"); const char* last = (const char*) (ucx_list_last(list)->data); @@ -103,10 +103,10 @@ } UCX_TEST_IMPLEMENT(test_ucx_list_get) { - UcxList *list = ucx_list_append(NULL, "Find "); + UcxList *list = ucx_list_append(NULL, (void*)"Find "); UCX_TEST_BEGIN - list = ucx_list_append(list, "the "); - list = ucx_list_append(list, "mid!"); + list = ucx_list_append(list, (void*)"the "); + list = ucx_list_append(list, (void*)"mid!"); const char* mid = (const char*) (ucx_list_get(list, 1)->data); @@ -117,10 +117,10 @@ } UCX_TEST_IMPLEMENT(test_ucx_list_remove) { - UcxList *list = ucx_list_append(NULL, "Hello"); + UcxList *list = ucx_list_append(NULL, (void*)"Hello"); UCX_TEST_BEGIN - list = ucx_list_append(list, " fucking"); - list = ucx_list_append(list, " World!"); + list = ucx_list_append(list, (void*)" fucking"); + list = ucx_list_append(list, (void*)" World!"); list = ucx_list_remove(list, ucx_list_get(list, 1)); @@ -163,21 +163,21 @@ } UCX_TEST_IMPLEMENT(test_ucx_list_sort) { - UcxList *list = ucx_list_append(NULL, "this"); - list = ucx_list_append(list, "is"); - list = ucx_list_append(list, "a"); - list = ucx_list_append(list, "test"); - list = ucx_list_append(list, "for"); - list = ucx_list_append(list, "partial"); - list = ucx_list_append(list, "correctness"); + UcxList *list = ucx_list_append(NULL, (void*)"this"); + list = ucx_list_append(list, (void*)"is"); + list = ucx_list_append(list, (void*)"a"); + list = ucx_list_append(list, (void*)"test"); + list = ucx_list_append(list, (void*)"for"); + list = ucx_list_append(list, (void*)"partial"); + list = ucx_list_append(list, (void*)"correctness"); - UcxList *expected = ucx_list_append(NULL, "a"); - expected = ucx_list_append(expected, "correctness"); - expected = ucx_list_append(expected, "for"); - expected = ucx_list_append(expected, "is"); - expected = ucx_list_append(expected, "partial"); - expected = ucx_list_append(expected, "test"); - expected = ucx_list_append(expected, "this"); + UcxList *expected = ucx_list_append(NULL, (void*)"a"); + expected = ucx_list_append(expected, (void*)"correctness"); + expected = ucx_list_append(expected, (void*)"for"); + expected = ucx_list_append(expected, (void*)"is"); + expected = ucx_list_append(expected, (void*)"partial"); + expected = ucx_list_append(expected, (void*)"test"); + expected = ucx_list_append(expected, (void*)"this"); list = ucx_list_sort(list, cmp_string, NULL);