1 /* Test of <uchar.h> substitute.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17 /* Written by Bruno Haible <bruno@clisp.org>, 2019. */
25 /* Check that the types are defined. */
31 /* Check that char16_t and char32_t are unsigned types. */
32 verify ((char16_t
)(-1) >= 0);
34 verify ((char32_t
)(-1) >= 0);
37 /* Check that char32_t is at least 31 bits wide. */
38 verify ((char32_t
)0x7FFFFFFF != (char32_t
)0x3FFFFFFF);
40 /* Check that _GL_LARGE_CHAR32_T is correctly defined. */
41 #if _GL_LARGE_CHAR32_T
42 verify (sizeof (char32_t
) > sizeof (wchar_t));
44 verify (sizeof (char32_t
) == sizeof (wchar_t));