diff -r 18823857ce79 -r 47f7fdbddb62 test/dlist_tests.c --- a/test/dlist_tests.c Wed Feb 27 09:41:17 2013 +0100 +++ b/test/dlist_tests.c Wed Feb 27 10:09:23 2013 +0100 @@ -3,6 +3,7 @@ */ #include "dlist_tests.h" +#include "ucx/comparator.h" UCX_TEST_IMPLEMENT(test_ucx_dlist_append) { UcxDlist *list = ucx_dlist_append(NULL, (void*)"Hello"); @@ -46,8 +47,8 @@ list3 = ucx_dlist_prepend(list3, (void*)"Hallo"); UCX_TEST_BEGIN - UCX_TEST_ASSERT(ucx_dlist_equals(list, list2, cmp_string, NULL), "failed"); - UCX_TEST_ASSERT(!ucx_dlist_equals(list, list3, cmp_string, NULL), "failed"); + UCX_TEST_ASSERT(ucx_dlist_equals(list, list2, ucx_strcmp, NULL), "failed"); + UCX_TEST_ASSERT(!ucx_dlist_equals(list, list3, ucx_strcmp, NULL), "failed"); UCX_TEST_END ucx_dlist_free(list3); @@ -160,7 +161,7 @@ UcxDlist *copy = ucx_dlist_clone(list, copy_string, NULL); UCX_TEST_BEGIN - UCX_TEST_ASSERT(ucx_dlist_equals(list, copy, cmp_string, NULL), "failed"); + UCX_TEST_ASSERT(ucx_dlist_equals(list, copy, ucx_strcmp, NULL), "failed"); UCX_TEST_ASSERT(hello != copy->data, "first element is no copy"); UCX_TEST_ASSERT(world != copy->next->data, "second element is no copy"); @@ -191,11 +192,11 @@ expected = ucx_dlist_append(expected, (void*)"test"); expected = ucx_dlist_append(expected, (void*)"this"); - list = ucx_dlist_sort(list, cmp_string, NULL); + list = ucx_dlist_sort(list, ucx_strcmp, NULL); UCX_TEST_BEGIN UCX_TEST_ASSERT( - ucx_dlist_equals(list, expected, cmp_string, NULL), "failed"); + ucx_dlist_equals(list, expected, ucx_strcmp, NULL), "failed"); UcxDlist *l = list; UCX_TEST_ASSERT(l->prev == NULL, "prev field of first entry is not null"); while (l->next != NULL) {