Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
TingDaoK committed Jan 27, 2025
1 parent 34013d5 commit e2f28f3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ add_test_case(uri_ipv4_parse)
add_test_case(uri_invalid_scheme_parse)
add_test_case(uri_invalid_port_parse)
add_test_case(uri_port_too_large_parse)
add_test_case(uri_single_colon_parse)
add_test_case(uri_builder)
add_test_case(uri_builder_from_string)
add_test_case(test_uri_encode_path_rfc3986)
Expand Down
13 changes: 13 additions & 0 deletions tests/uri_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,19 @@ static int s_test_uri_port_too_large_parse(struct aws_allocator *allocator, void

AWS_TEST_CASE(uri_port_too_large_parse, s_test_uri_port_too_large_parse);

static int s_test_uri_single_colon_parse(struct aws_allocator *allocator, void *ctx) {
(void)ctx;
const char *str_uri = ":";

struct aws_byte_cursor uri_csr = aws_byte_cursor_from_c_str(str_uri);
struct aws_uri uri;
ASSERT_SUCCESS(aws_uri_init_parse(&uri, allocator, &uri_csr));
aws_uri_clean_up(&uri);
return AWS_OP_SUCCESS;
}

AWS_TEST_CASE(uri_single_colon_parse, s_test_uri_single_colon_parse);

static int s_test_uri_builder(struct aws_allocator *allocator, void *ctx) {
(void)ctx;
const char *str_uri =
Expand Down

0 comments on commit e2f28f3

Please sign in to comment.