From 282e2d4ec17f251ffbfa29e45bede693c2fedec9 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Wed, 24 Jul 2019 18:15:10 +0200 Subject: tests: common: sort: fixes --- tests/common/check_sort.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/common/check_sort.c b/tests/common/check_sort.c index 3c4764f..f49710c 100644 --- a/tests/common/check_sort.c +++ b/tests/common/check_sort.c @@ -11,6 +11,7 @@ #include #include #include +#include #include "../../src/common/utils.h" #include "../../src/common/sort.h" @@ -26,7 +27,7 @@ static void test_slist_sort_empty(void **state) { bc_slist_t *l = NULL; - assert_null(bc_slist_sort(l, sort_func)); + assert_null(bc_slist_sort(l, (bc_sort_func_t) sort_func)); } @@ -36,7 +37,7 @@ test_slist_sort_single(void **state) bc_slist_t *l = NULL; l = bc_slist_append(l, bc_strdup("a")); - l = bc_slist_sort(l, sort_func); + l = bc_slist_sort(l, (bc_sort_func_t) sort_func); assert_non_null(l); assert_string_equal(l->data, "a"); @@ -54,7 +55,7 @@ test_slist_sort_sorted(void **state) l = bc_slist_append(l, bc_strdup("b")); l = bc_slist_append(l, bc_strdup("c")); - l = bc_slist_sort(l, sort_func); + l = bc_slist_sort(l, (bc_sort_func_t) sort_func); assert_non_null(l); assert_string_equal(l->data, "a"); @@ -75,7 +76,7 @@ test_slist_sort_reverse(void **state) l = bc_slist_append(l, bc_strdup("b")); l = bc_slist_append(l, bc_strdup("a")); - l = bc_slist_sort(l, sort_func); + l = bc_slist_sort(l, (bc_sort_func_t) sort_func); assert_non_null(l); assert_string_equal(l->data, "a"); @@ -97,7 +98,7 @@ test_slist_sort_mixed1(void **state) l = bc_slist_append(l, bc_strdup("c")); l = bc_slist_append(l, bc_strdup("b")); - l = bc_slist_sort(l, sort_func); + l = bc_slist_sort(l, (bc_sort_func_t) sort_func); assert_non_null(l); assert_string_equal(l->data, "a"); @@ -119,7 +120,7 @@ test_slist_sort_mixed2(void **state) l = bc_slist_append(l, bc_strdup("a")); l = bc_slist_append(l, bc_strdup("d")); - l = bc_slist_sort(l, sort_func); + l = bc_slist_sort(l, (bc_sort_func_t) sort_func); assert_non_null(l); assert_string_equal(l->data, "a"); -- cgit v1.2.3-18-g5258