From a6f51ee3faf37bfcb759b96ee76c85c490395b48 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Fri, 1 Mar 2024 00:53:19 +0100 Subject: Remove unnecessary macro --- source/tests/xml.test.c | 66 +++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 29 deletions(-) (limited to 'source/tests/xml.test.c') diff --git a/source/tests/xml.test.c b/source/tests/xml.test.c index 1534030..a31da8f 100644 --- a/source/tests/xml.test.c +++ b/source/tests/xml.test.c @@ -4,7 +4,7 @@ #include "../kit/test.h" TEST("xml parse tag") { - is_handle_t is = IS_WRAP_STRING(SZ(" ")); + is_handle_t is = is_wrap_string(SZ(" "), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -19,7 +19,7 @@ TEST("xml parse tag") { } TEST("xml parse tag with dash") { - is_handle_t is = IS_WRAP_STRING(SZ(" ")); + is_handle_t is = is_wrap_string(SZ(" "), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -34,7 +34,7 @@ TEST("xml parse tag with dash") { } TEST("xml parse tag not closed") { - is_handle_t is = IS_WRAP_STRING(SZ("")); + is_handle_t is = is_wrap_string(SZ(""), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_PARSING_FAILED); @@ -46,7 +46,7 @@ TEST("xml parse tag not closed") { } TEST("xml parse tag text") { - is_handle_t is = IS_WRAP_STRING(SZ(" bar ")); + is_handle_t is = is_wrap_string(SZ(" bar "), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -62,7 +62,7 @@ TEST("xml parse tag text") { } TEST("xml parse empty tag") { - is_handle_t is = IS_WRAP_STRING(SZ("")); + is_handle_t is = is_wrap_string(SZ(""), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -77,7 +77,7 @@ TEST("xml parse empty tag") { } TEST("xml parse tail") { - is_handle_t is = IS_WRAP_STRING(SZ(" bar")); + is_handle_t is = is_wrap_string(SZ(" bar"), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -92,7 +92,7 @@ TEST("xml parse tail") { } TEST("xml parse empty tail") { - is_handle_t is = IS_WRAP_STRING(SZ(" bar")); + is_handle_t is = is_wrap_string(SZ(" bar"), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -107,7 +107,7 @@ TEST("xml parse empty tail") { } TEST("xml parse property") { - is_handle_t is = IS_WRAP_STRING(SZ("")); + is_handle_t is = is_wrap_string(SZ(""), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -126,7 +126,7 @@ TEST("xml parse property") { } TEST("xml parse empty property") { - is_handle_t is = IS_WRAP_STRING(SZ("")); + is_handle_t is = is_wrap_string(SZ(""), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -145,7 +145,7 @@ TEST("xml parse empty property") { } TEST("xml parse child") { - is_handle_t is = IS_WRAP_STRING(SZ("")); + is_handle_t is = is_wrap_string(SZ(""), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -162,7 +162,8 @@ TEST("xml parse child") { } TEST("xml parse child with text and tail") { - is_handle_t is = IS_WRAP_STRING(SZ("text tail")); + is_handle_t is = is_wrap_string(SZ("text tail"), + NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -182,7 +183,7 @@ TEST("xml parse child with text and tail") { } TEST("xml parse declaration") { - is_handle_t is = IS_WRAP_STRING(SZ("")); + is_handle_t is = is_wrap_string(SZ(""), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -197,7 +198,7 @@ TEST("xml parse declaration") { } TEST("xml parse comment") { - is_handle_t is = IS_WRAP_STRING(SZ("")); + is_handle_t is = is_wrap_string(SZ(""), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -212,7 +213,8 @@ TEST("xml parse comment") { } TEST("xml parse comment before text") { - is_handle_t is = IS_WRAP_STRING(SZ(" bar ")); + is_handle_t is = is_wrap_string(SZ(" bar "), + NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -227,7 +229,8 @@ TEST("xml parse comment before text") { } TEST("xml parse comment after text") { - is_handle_t is = IS_WRAP_STRING(SZ("foo ")); + is_handle_t is = is_wrap_string(SZ("foo "), + NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -242,8 +245,8 @@ TEST("xml parse comment after text") { } TEST("xml parse comment between text") { - is_handle_t is = IS_WRAP_STRING( - SZ("foo bar")); + is_handle_t is = is_wrap_string( + SZ("foo bar"), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -258,7 +261,7 @@ TEST("xml parse comment between text") { } TEST("xml parse comment tail") { - is_handle_t is = IS_WRAP_STRING(SZ("")); + is_handle_t is = is_wrap_string(SZ(""), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -273,7 +276,8 @@ TEST("xml parse comment tail") { } TEST("xml parse comment tail before text") { - is_handle_t is = IS_WRAP_STRING(SZ(" bar")); + is_handle_t is = is_wrap_string(SZ(" bar"), + NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -289,7 +293,8 @@ TEST("xml parse comment tail before text") { } TEST("xml parse comment tail after text") { - is_handle_t is = IS_WRAP_STRING(SZ(" bar ")); + is_handle_t is = is_wrap_string(SZ(" bar "), + NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -305,7 +310,8 @@ TEST("xml parse comment tail after text") { } TEST("xml parse comment tail between text") { - is_handle_t is = IS_WRAP_STRING(SZ("foo bar")); + is_handle_t is = is_wrap_string(SZ("foo bar"), + NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -321,7 +327,7 @@ TEST("xml parse comment tail between text") { } TEST("xml parse escaped text") { - is_handle_t is = IS_WRAP_STRING(SZ("<foo>")); + is_handle_t is = is_wrap_string(SZ("<foo>"), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -336,7 +342,8 @@ TEST("xml parse escaped text") { } TEST("xml parse escaped quote property") { - is_handle_t is = IS_WRAP_STRING(SZ("")); + is_handle_t is = is_wrap_string(SZ(""), + NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -357,7 +364,8 @@ TEST("xml parse escaped quote property") { } TEST("xml parse escaped apostrophe property") { - is_handle_t is = IS_WRAP_STRING(SZ("")); + is_handle_t is = is_wrap_string(SZ(""), + NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -377,7 +385,7 @@ TEST("xml parse escaped apostrophe property") { } TEST("xml parse invalid escape") { - is_handle_t is = IS_WRAP_STRING(SZ("&foobar;")); + is_handle_t is = is_wrap_string(SZ("&foobar;"), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_PARSING_FAILED); @@ -389,8 +397,8 @@ TEST("xml parse invalid escape") { } TEST("xml full text") { - is_handle_t is = IS_WRAP_STRING( - SZ("foo text bar text tail")); + is_handle_t is = is_wrap_string( + SZ("foo text bar text tail"), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); @@ -407,8 +415,8 @@ TEST("xml full text") { } TEST("xml property") { - is_handle_t is = IS_WRAP_STRING( - SZ("")); + is_handle_t is = is_wrap_string( + SZ(""), NULL); xml_parse_result_t res = xml_parse(is, NULL); REQUIRE_EQ(res.status, KIT_OK); -- cgit v1.2.3