From 8499b75fb011d72eeb5acbd85bcf41e4ee51e9a7 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Sun, 17 Sep 2023 00:40:34 +0200 Subject: XML --- source/tests/input_buffer.test.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'source/tests/input_buffer.test.c') diff --git a/source/tests/input_buffer.test.c b/source/tests/input_buffer.test.c index 4712da9..237d60d 100644 --- a/source/tests/input_buffer.test.c +++ b/source/tests/input_buffer.test.c @@ -6,9 +6,9 @@ TEST("input buffer read once") { str_t text = { .size = 3, .values = "foo" }; is_handle_t in = IS_WRAP_STRING(text); - ib_handle_t first = IB_WRAP(in); + ib_t first = IB_WRAP(in); - ib_handle_t second = ib_read(first, 3); + ib_t second = ib_read(first, 3); REQUIRE(second.status == KIT_OK); REQUIRE(second.data.size == 3); @@ -23,10 +23,10 @@ TEST("input buffer read again") { str_t text = { .size = 6, .values = "foobar" }; str_t foo = { .size = 3, .values = "foo" }; is_handle_t in = IS_WRAP_STRING(text); - ib_handle_t first = IB_WRAP(in); + ib_t first = IB_WRAP(in); - ib_handle_t second = ib_read(first, 3); - ib_handle_t third = ib_read(first, 3); + ib_t second = ib_read(first, 3); + ib_t third = ib_read(first, 3); REQUIRE(AR_EQUAL(foo, second.data)); REQUIRE(AR_EQUAL(foo, third.data)); @@ -42,10 +42,10 @@ TEST("input buffer read twice") { str_t foo = { .size = 3, .values = "foo" }; str_t bar = { .size = 3, .values = "bar" }; is_handle_t in = IS_WRAP_STRING(text); - ib_handle_t first = IB_WRAP(in); + ib_t first = IB_WRAP(in); - ib_handle_t second = ib_read(first, 3); - ib_handle_t third = ib_read(second, 3); + ib_t second = ib_read(first, 3); + ib_t third = ib_read(second, 3); REQUIRE(AR_EQUAL(foo, second.data)); REQUIRE(AR_EQUAL(bar, third.data)); @@ -67,9 +67,9 @@ TEST("input buffer read integer once") { str_t text = { .size = 9, .values = "31415 foo" }; str_t num = { .size = 5, .values = "31415" }; is_handle_t in = IS_WRAP_STRING(text); - ib_handle_t first = IB_WRAP(in); + ib_t first = IB_WRAP(in); - ib_handle_t second = ib_read_while(first, is_integer_); + ib_t second = ib_while(first, is_integer_); REQUIRE(second.status == KIT_OK); REQUIRE(second.data.size == 5); @@ -85,11 +85,11 @@ TEST("input buffer read integer twice") { str_t num_0 = { .size = 3, .values = "314" }; str_t num_1 = { .size = 2, .values = "15" }; is_handle_t in = IS_WRAP_STRING(text); - ib_handle_t first = IB_WRAP(in); + ib_t first = IB_WRAP(in); - ib_handle_t second = ib_read_while(first, is_integer_); - ib_handle_t third = ib_read(second, 1); - ib_handle_t fourth = ib_read_while(third, is_integer_); + ib_t second = ib_while(first, is_integer_); + ib_t third = ib_read(second, 1); + ib_t fourth = ib_while(third, is_integer_); REQUIRE(fourth.status == KIT_OK); REQUIRE(second.data.size == 3); -- cgit v1.2.3