Skip to content

Commit

Permalink
Cover strlen cast
Browse files Browse the repository at this point in the history
  • Loading branch information
Feoramund committed Jun 30, 2024
1 parent 9d6353c commit c52b1ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_runner.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ int main(int argc, const char** argv) {
test_case t = official_grapheme_break_test_cases[i];

ucg_int grapheme_count;
ucg_int result = ucg_grapheme_count((uint8_t*)t.str, strlen(t.str), NULL, &grapheme_count, NULL);
ucg_int result = ucg_grapheme_count((uint8_t*)t.str, (ucg_int)strlen(t.str), NULL, &grapheme_count, NULL);
if (result != 0) {
fprintf(stderr, "(#% 4li) failed due to UTF-8 parsing error: %li\n", i, result);
}
Expand All @@ -33,7 +33,7 @@ int main(int argc, const char** argv) {
for (ucg_int i = 0; i < (ucg_int)(sizeof(official_emoji_test_cases) / sizeof(test_case)); i += 1) {
test_case t = official_emoji_test_cases[i];
ucg_int grapheme_count;
ucg_int result = ucg_grapheme_count((uint8_t*)t.str, strlen(t.str), NULL, &grapheme_count, NULL);
ucg_int result = ucg_grapheme_count((uint8_t*)t.str, (ucg_int)strlen(t.str), NULL, &grapheme_count, NULL);
if (result != 0) {
fprintf(stderr, "(#% 4li) failed due to UTF-8 parsing error: %li\n", i, result);
}
Expand Down

0 comments on commit c52b1ac

Please sign in to comment.