1 /* Tests escape sequences
9 #include <stddef.h> // For wchar_t
10 #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.
11 #include <uchar.h> // For char16_t, char32_t
18 #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.
22 ASSERT ('\x55' == 0x55);
26 #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.
27 ASSERT (u
'\777' == 0777);
31 ASSERT (u
'\x55aa' == 0x55aau
);
33 ASSERT (u
== 0x55aau
);
35 ASSERT (u
'\u55aa' == 0x55aau
);
37 ASSERT (u
== 0x55aau
);