summaryrefslogtreecommitdiff
path: root/source/test
diff options
context:
space:
mode:
authorMitya Selivanov <0x7fffff@guattari.ru>2022-08-07 06:58:00 +0400
committerMitya Selivanov <0x7fffff@guattari.ru>2022-08-07 06:58:00 +0400
commitd9e0da408325e36852ca80643cb25fa9b3717889 (patch)
treed50be9f761fb032e5a5b9943260291e2f6dd20af /source/test
parentcf4feeb3c297f0ea1f72a2747dc65662dd18175f (diff)
downloadkit-d9e0da408325e36852ca80643cb25fa9b3717889.zip
Refactor
Diffstat (limited to 'source/test')
-rw-r--r--source/test/unittests/input_buffer.test.c8
-rw-r--r--source/test/unittests/input_stream.test.c10
2 files changed, 9 insertions, 9 deletions
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));