| 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 | // UNSUPPORTED: no-localization |
| 10 | |
| 11 | // <locale.h> |
| 12 | |
| 13 | #include <locale.h> |
| 14 | |
| 15 | #include "test_macros.h" |
| 16 | |
| 17 | #ifndef LC_ALL |
| 18 | #error LC_ALL not defined |
| 19 | #endif |
| 20 | |
| 21 | #ifndef LC_COLLATE |
| 22 | #error LC_COLLATE not defined |
| 23 | #endif |
| 24 | |
| 25 | #ifndef LC_CTYPE |
| 26 | #error LC_CTYPE not defined |
| 27 | #endif |
| 28 | |
| 29 | #ifndef LC_MONETARY |
| 30 | #error LC_MONETARY not defined |
| 31 | #endif |
| 32 | |
| 33 | #ifndef LC_NUMERIC |
| 34 | #error LC_NUMERIC not defined |
| 35 | #endif |
| 36 | |
| 37 | #ifndef LC_TIME |
| 38 | #error LC_TIME not defined |
| 39 | #endif |
| 40 | |
| 41 | #ifndef NULL |
| 42 | #error NULL not defined |
| 43 | #endif |
| 44 | |
| 45 | lconv lc; |
| 46 | ASSERT_SAME_TYPE(char*, decltype(setlocale(category: 0, locale: "" ))); |
| 47 | ASSERT_SAME_TYPE(lconv*, decltype(localeconv())); |
| 48 | |