Skip to content

Commit 02d0c9c

Browse files
committed
[test] just convert short input
1 parent c977df2 commit 02d0c9c

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

test.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -66,33 +66,9 @@ TEST test_utf8_to_utf32(void) {
6666
ASSERT_EQ(converted.read_len, len);
6767
ASSERT_EQ(converted.written_len, 17);
6868
ASSERT_EQ(utf32_output[converted.written_len - 2], 233);
69-
70-
printf("Did first utf8_to_utf32 test\n");
7169

72-
const unsigned char *data_long_str = (unsigned char *)"we on a world tour we on a world tour we on a world tour we on a world tour we on a world tour we on a world tour we on a world tour we on a world tour we on a world tour we on a world tour we on a world tour nous sommes en tournée mondiale";
73-
size_t len_long = strlen((const char *)data_long_str);
74-
char *data_long = aligned_malloc(len_long, 32);
75-
memcpy(data_long, data_long_str, len_long);
76-
size_t utf32_output_len_long = len_long;
77-
uint32_t *utf32_output_long = aligned_malloc(utf32_output_len_long * sizeof(uint32_t), 32);
78-
utf_result_t converted_long = convert_utf8_to_utf32(data_long, len_long, utf32_output_long, utf32_output_len_long);
79-
ASSERT_EQ(converted_long.return_code, SIMDUTF_SUCCESS);
80-
ASSERT_EQ(converted_long.read_len, len_long);
81-
ASSERT_EQ(converted_long.written_len, 240);
82-
ASSERT_EQ(utf32_output_long[converted_long.written_len - 11], 233);
83-
84-
memset(utf32_output, 0, utf32_output_len * sizeof(uint32_t));
85-
86-
converted_long = convert_valid_utf8_to_utf32(data_long, len_long, utf32_output_long, utf32_output_len_long);
87-
ASSERT_EQ(converted_long.return_code, SIMDUTF_SUCCESS);
88-
ASSERT_EQ(converted_long.read_len, len_long);
89-
ASSERT_EQ(converted_long.written_len, 240);
90-
ASSERT_EQ(utf32_output_long[converted_long.written_len - 11], 233);
91-
9270
aligned_free(data);
9371
aligned_free(utf32_output);
94-
aligned_free(data_long);
95-
aligned_free(utf32_output_long);
9672

9773
PASS();
9874
}

0 commit comments

Comments
 (0)