1 | //===----------------------------------------------------------------------===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | // test <limits.h> |
10 | // |
11 | // Even though <limits.h> is not provided by libc++, we still test that |
12 | // using it with libc++ on the search path will work. |
13 | |
14 | #include <limits.h> |
15 | |
16 | #ifndef CHAR_BIT |
17 | #error CHAR_BIT not defined |
18 | #endif |
19 | |
20 | #ifndef SCHAR_MIN |
21 | #error SCHAR_MIN not defined |
22 | #endif |
23 | |
24 | #ifndef SCHAR_MAX |
25 | #error SCHAR_MAX not defined |
26 | #endif |
27 | |
28 | #ifndef UCHAR_MAX |
29 | #error UCHAR_MAX not defined |
30 | #endif |
31 | |
32 | #ifndef CHAR_MIN |
33 | #error CHAR_MIN not defined |
34 | #endif |
35 | |
36 | #ifndef CHAR_MAX |
37 | #error CHAR_MAX not defined |
38 | #endif |
39 | |
40 | #ifndef MB_LEN_MAX |
41 | #error MB_LEN_MAX not defined |
42 | #endif |
43 | |
44 | #ifndef SHRT_MIN |
45 | #error SHRT_MIN not defined |
46 | #endif |
47 | |
48 | #ifndef SHRT_MAX |
49 | #error SHRT_MAX not defined |
50 | #endif |
51 | |
52 | #ifndef USHRT_MAX |
53 | #error USHRT_MAX not defined |
54 | #endif |
55 | |
56 | #ifndef INT_MIN |
57 | #error INT_MIN not defined |
58 | #endif |
59 | |
60 | #ifndef INT_MAX |
61 | #error INT_MAX not defined |
62 | #endif |
63 | |
64 | #ifndef UINT_MAX |
65 | #error UINT_MAX not defined |
66 | #endif |
67 | |
68 | #ifndef LONG_MIN |
69 | #error LONG_MIN not defined |
70 | #endif |
71 | |
72 | #ifndef LONG_MAX |
73 | #error LONG_MAX not defined |
74 | #endif |
75 | |
76 | #ifndef ULONG_MAX |
77 | #error ULONG_MAX not defined |
78 | #endif |
79 | |
80 | #ifndef LLONG_MIN |
81 | #error LLONG_MIN not defined |
82 | #endif |
83 | |
84 | #ifndef LLONG_MAX |
85 | #error LLONG_MAX not defined |
86 | #endif |
87 | |
88 | #ifndef ULLONG_MAX |
89 | #error ULLONG_MAX not defined |
90 | #endif |
91 | |