1 /* Tests character constants.
9 #include <stddef.h> // For wchar_t
11 #if defined(__SDCC) || defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__APPLE__) && !defined(__OpenBSD__) // As of 2023, macOS and OpenBSD are still not fully C11-compliant: they lack uchar.h.
12 #include <uchar.h> // For char16_t, char32_t
24 #if defined(__SDCC) || defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
25 ASSERT (_Generic('c', default: 1, int: 0) == 0);
26 ASSERT (_Generic(L
'c', default: 1, wchar_t: 0) == 0);
27 #if !defined(__APPLE__) && !defined(__OpenBSD__) // As of 2023, macOS and OpenBSD are still not C11-compliant: they lack uchar.h.
28 ASSERT (_Generic(u
'c', default: 1, char16_t
: 0) == 0);
29 ASSERT (_Generic(U
'c', default: 1, char32_t
: 0) == 0);