1# Integral type tests
2
3These tests check that various macros, constants and typedefs in
4<stdint.h> and <stddef.h> are correct.
5
6There are two essentially identical source files, one in C and one in
7C++. Certain types are built into C++ but not into C, so we need to
8test both. Additionally, writing very precise tests comparing values
9or types is considerably easier with C++ machinery like decltype and
10templated type traits.
11
12Since `wchar_t` in particular is so finicky, it is separately tested
13in source files that only include <wchar.h>. In the past there were
14bugs where the `wchar_t` header was broken in a way that was masked by
15the presence of <stdint.h>, which is very often the case.
16
17This level of detail in tests is valuable in part because compilers
18(GCC and Clang) differ in what predefined macros they create. For
19instance, sufficiently new GCCs define `__WCHAR_MIN__` as a builtin,
20but Clang does not.
21