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
This commit is contained in:
Björn Svensson 2023-09-22 15:25:01 +02:00
parent 2c06b8d750
commit 7c625f8f4c

View file

@ -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);