Skip to content

Commit 96c4807

Browse files
committed
[test] trying a string that's encodable as Latin-1 to see if that's the issue
1 parent 2191134 commit 96c4807

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 *)"we on a world tour nous sommes en tournée mondiale мы в мировом турне a wa lori irin-ajo agbaye είμαστε σε παγκόσμια περιοδεία jesteśmy w trasie dookoła świata míele xexeame katã ƒetsaɖiɖi aɖe dzi";
72+
const unsigned char *data_long_str = (unsigned char *)"we on a world tour nous sommes en tournée mondiale vi er på verdensturné";
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, 196);
82-
ASSERT_EQ(utf32_output_long[converted_long.written_len - 6], 598);
81+
ASSERT_EQ(converted_long.written_len, 72);
82+
ASSERT_EQ(utf32_output_long[converted_long.written_len - 14], 229);
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, 196);
90-
ASSERT_EQ(utf32_output_long[converted_long.written_len - 6], 598);
89+
ASSERT_EQ(converted_long.written_len, 72);
90+
ASSERT_EQ(utf32_output_long[converted_long.written_len - 14], 229);
9191

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

0 commit comments

Comments
 (0)