summaryrefslogtreecommitdiff
path: root/tests/uniwbrk/test-u16-wordbreaks.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/uniwbrk/test-u16-wordbreaks.c')
-rw-r--r--tests/uniwbrk/test-u16-wordbreaks.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/uniwbrk/test-u16-wordbreaks.c b/tests/uniwbrk/test-u16-wordbreaks.c
index 601ccb9c..8c301a4c 100644
--- a/tests/uniwbrk/test-u16-wordbreaks.c
+++ b/tests/uniwbrk/test-u16-wordbreaks.c
@@ -1,5 +1,5 @@
/* Test of word breaks in UTF-16 strings.
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,11 +41,10 @@ main ()
0x65E5, 0x672C, 0x8A9E, ',', 0x4E2D, 0x6587, ',', 0xD55C, 0xAE00, '\n'
};
char *p = (char *) malloc (SIZEOF (input));
- size_t i;
u16_wordbreaks (input, SIZEOF (input), p);
- for (i = 0; i < 61; i++)
+ for (size_t i = 0; i < 61; i++)
{
ASSERT (p[i] == ((i >= 4 && i <= 5)
|| (i >= 9 && i <= 11)
@@ -73,11 +72,10 @@ main ()
0x1112, 0x1161, 0x11AB, 0x1100, 0x1173, 0x11AF, '\n'
};
char *p = (char *) malloc (SIZEOF (input));
- size_t i;
u16_wordbreaks (input, SIZEOF (input), p);
- for (i = 0; i < 67; i++)
+ for (size_t i = 0; i < 67; i++)
{
ASSERT (p[i] == ((i >= 5 && i <= 6)
|| (i >= 10 && i <= 12)
@@ -97,10 +95,9 @@ main ()
static const uint16_t input[8] =
{ 'a', '\n', 'b', '\r', 'c', '\r', '\n', 'd' };
char *p = (char *) malloc (SIZEOF (input));
- size_t i;
u16_wordbreaks (input, SIZEOF (input), p);
- for (i = 0; i < 8; i++)
+ for (size_t i = 0; i < 8; i++)
{
ASSERT (p[i] == (i == 1 || i == 2 || i == 3 || i == 4 || i == 5
|| i == 7 ? 1 :
@@ -114,10 +111,9 @@ main ()
static const uint16_t input[10] =
{ '.', 0xD83C, 0xDDE9, 0xD83C, 0xDDEA, 0xD83C, 0xDDEB, 0xD83C, 0xDDF7, '.' };
char *p = (char *) malloc (SIZEOF (input));
- size_t i;
u16_wordbreaks (input, SIZEOF (input), p);
- for (i = 0; i < 10; i++)
+ for (size_t i = 0; i < 10; i++)
{
ASSERT (p[i] == (i == 1 || i == 5 || i == 9 ? 1 : 0));
}