From 7c625f8f4c006ec5bb8059d6b154f84ea4279662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Svensson?= Date: Fri, 22 Sep 2023 15:25:01 +0200 Subject: [PATCH] Replace use of deprecated libcheck API fail_if() Fixes [-Wformat-extra-args] warnings when built using GCC, See details in: https://github.com/libcheck/check/pull/298 --- tests/check_tree.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/check_tree.c b/tests/check_tree.c index 19b6c14..5f0f4a5 100644 --- a/tests/check_tree.c +++ b/tests/check_tree.c @@ -714,19 +714,19 @@ START_TEST(test_route_cmp) R3Route *r1 = r3_node_append_route(n,test_str, strlen(test_str),0,0); match_entry * m = match_entry_create("/blog/post"); - fail_if( r3_route_cmp(r1, m) == -1, "should match"); + ck_assert_msg(r3_route_cmp(r1, m) == 0, "should match"); r1->request_method = METHOD_GET; m->request_method = METHOD_GET; - fail_if( r3_route_cmp(r1, m) == -1, "should match"); + ck_assert_msg(r3_route_cmp(r1, m) == 0, "should match"); r1->request_method = METHOD_GET; m->request_method = METHOD_POST; - fail_if( r3_route_cmp(r1, m) == 0, "should be different"); + ck_assert_msg(r3_route_cmp(r1, m) == -1, "should be different"); r1->request_method = METHOD_GET; m->request_method = METHOD_POST | METHOD_GET; - fail_if( r3_route_cmp(r1, m) == -1, "should match"); + ck_assert_msg(r3_route_cmp(r1, m) == 0, "should match"); match_entry_free(m); r3_tree_free(n);