From d9e0da408325e36852ca80643cb25fa9b3717889 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov <0x7fffff@guattari.ru> Date: Sun, 7 Aug 2022 06:58:00 +0400 Subject: Refactor --- source/test/unittests/input_buffer.test.c | 8 ++++---- source/test/unittests/input_stream.test.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'source/test') diff --git a/source/test/unittests/input_buffer.test.c b/source/test/unittests/input_buffer.test.c index c7edb8f..23499ee 100644 --- a/source/test/unittests/input_buffer.test.c +++ b/source/test/unittests/input_buffer.test.c @@ -4,11 +4,11 @@ #include "../../kit_test/test.h" TEST("input buffer") { - cstr text = { .size = 3, .values = "foo" }; - struct is_handle in = IS_WRAP_STRING(text); - struct ib_handle first = IB_WRAP(in); + cstr_t text = { .size = 3, .values = "foo" }; + is_handle_t in = IS_WRAP_STRING(text); + ib_handle_t first = IB_WRAP(in); - struct ib_handle second = ib_read(first, 3); + ib_handle_t second = ib_read(first, 3); REQUIRE(!second.error); REQUIRE(second.data.size == 3); diff --git a/source/test/unittests/input_stream.test.c b/source/test/unittests/input_stream.test.c index 9fef47a..e646983 100644 --- a/source/test/unittests/input_stream.test.c +++ b/source/test/unittests/input_stream.test.c @@ -7,13 +7,13 @@ TEST("input stream wrap string") { char foo[] = "test"; char bar[] = "test"; - cstr foo_ref = { .size = sizeof(foo) - 1, .values = foo }; - cstr bar_ref = { .size = sizeof(bar) - 1, .values = bar }; + cstr_t foo_ref = { .size = sizeof(foo) - 1, .values = foo }; + cstr_t bar_ref = { .size = sizeof(bar) - 1, .values = bar }; - struct is_handle in = IS_WRAP_STRING(foo_ref); + is_handle_t in = IS_WRAP_STRING(foo_ref); - char buf[4]; - out_str buf_ref = { .size = sizeof(buf), .values = buf }; + char buf[4]; + out_str_t buf_ref = { .size = sizeof(buf), .values = buf }; REQUIRE(IS_READ(in, buf_ref) == buf_ref.size); REQUIRE(AR_EQUAL(foo_ref, bar_ref)); -- cgit v1.2.3