Skip to content

Commit 7c8915d

Browse files
committed
[test] trying with ASCII bytes and then one non-ASCII sequence at the end
1 parent 87b418a commit 7c8915d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ TEST test_utf8_to_utf32(void) {
6969

7070
printf("Did first utf8_to_utf32 test\n");
7171

72-
const unsigned char *data_long_str = (unsigned char *)u8"we on a world tour nous sommes en tournée mondiale vi er på verdensturné";
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";
7373
size_t len_long = strlen((const char *)data_long_str);
7474
char *data_long = aligned_malloc(len_long, 32);
7575
memcpy(data_long, data_long_str, len_long);
@@ -78,16 +78,16 @@ TEST test_utf8_to_utf32(void) {
7878
utf_result_t converted_long = convert_utf8_to_utf32(data_long, len_long, utf32_output_long, utf32_output_len_long);
7979
ASSERT_EQ(converted_long.return_code, SIMDUTF_SUCCESS);
8080
ASSERT_EQ(converted_long.read_len, len_long);
81-
ASSERT_EQ(converted_long.written_len, 72);
82-
ASSERT_EQ(utf32_output_long[converted_long.written_len - 14], 229);
81+
ASSERT_EQ(converted_long.written_len, 240);
82+
ASSERT_EQ(utf32_output_long[converted_long.written_len - 14], 233);
8383

8484
memset(utf32_output, 0, utf32_output_len * sizeof(uint32_t));
8585

8686
converted_long = convert_valid_utf8_to_utf32(data_long, len_long, utf32_output_long, utf32_output_len_long);
8787
ASSERT_EQ(converted_long.return_code, SIMDUTF_SUCCESS);
8888
ASSERT_EQ(converted_long.read_len, len_long);
89-
ASSERT_EQ(converted_long.written_len, 72);
90-
ASSERT_EQ(utf32_output_long[converted_long.written_len - 14], 229);
89+
ASSERT_EQ(converted_long.written_len, 240);
90+
ASSERT_EQ(utf32_output_long[converted_long.written_len - 14], 233);
9191

9292
aligned_free(data);
9393
aligned_free(utf32_output);

0 commit comments

Comments
 (0)