Skip to content

Commit 158e5af

Browse files
committed
testsuite/newlib.wctype: Check wctype for __WCHAR_MAX__
__WCHAR_MAX__ shouldn't match any isw* functions. On 2-byte wchar_t systems, it should be 0xffff which isn't used. On 4-byte wchar_t systems, it should be 0xffffffff, which is well outside the range of valid Unicode code points. Signed-off-by: Keith Packard <[email protected]>
1 parent 356d9d2 commit 158e5af

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

newlib/testsuite/newlib.wctype/tiswctype.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,9 @@ int main(void)
5757
x = wctype ("unknown");
5858
CHECK (x == 0);
5959

60+
CHECK(!iswprint((wint_t) __WCHAR_MAX__));
61+
CHECK(!iswcntrl((wint_t) __WCHAR_MAX__));
62+
CHECK(!iswgraph((wint_t) __WCHAR_MAX__));
63+
6064
exit (0);
6165
}

0 commit comments

Comments
 (0)