mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-04-28 06:33:36 +00:00
uchar-h tests: Strengthen tests.
* tests/test-uchar-h.c: Move #include <wchar.h> after most other tests are done.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2026-04-25 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
uchar-h tests: Strengthen tests.
|
||||
* tests/test-uchar-h.c: Move #include <wchar.h> after most other tests
|
||||
are done.
|
||||
|
||||
2026-04-24 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
regex: be consistent with dfa
|
||||
|
||||
@@ -18,13 +18,9 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Specification. */
|
||||
#include <uchar.h>
|
||||
|
||||
#include <wchar.h>
|
||||
|
||||
#if _GL_WCHAR_T_IS_UCS4
|
||||
static_assert (sizeof (char32_t) == sizeof (wchar_t));
|
||||
#endif
|
||||
|
||||
/* Check that the types are defined. */
|
||||
mbstate_t a = { 0 };
|
||||
@@ -49,6 +45,15 @@ static_assert ((char16_t)0xFFFF != (char16_t)0x7FFF);
|
||||
/* Check that char32_t is at least 31 bits wide. */
|
||||
static_assert ((char32_t)0x7FFFFFFF != (char32_t)0x3FFFFFFF);
|
||||
|
||||
|
||||
/* Checks relating to wchar_t. */
|
||||
|
||||
#include <wchar.h>
|
||||
|
||||
#if _GL_WCHAR_T_IS_UCS4
|
||||
static_assert (sizeof (char32_t) == sizeof (wchar_t));
|
||||
#endif
|
||||
|
||||
/* Check that _GL_SMALL_WCHAR_T is correctly defined. */
|
||||
#if _GL_SMALL_WCHAR_T
|
||||
static_assert (sizeof (wchar_t) < sizeof (char32_t));
|
||||
@@ -56,6 +61,7 @@ static_assert (sizeof (wchar_t) < sizeof (char32_t));
|
||||
static_assert (sizeof (wchar_t) == sizeof (char32_t));
|
||||
#endif
|
||||
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user