Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
Howard Hinnant | f5256e1 | 2010-05-11 21:36:01 +0000 | [diff] [blame] | 3 | // The LLVM Compiler Infrastructure |
Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 4 | // |
Howard Hinnant | b64f8b0 | 2010-11-16 22:09:02 +0000 | [diff] [blame] | 5 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | // Source Licenses. See LICENSE.TXT for details. |
Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | // <cwctype> |
| 11 | |
| 12 | #include <cwctype> |
| 13 | #include <type_traits> |
| 14 | |
| 15 | #ifndef WEOF |
| 16 | #error WEOF not defined |
| 17 | #endif |
| 18 | |
| 19 | #ifdef iswalnum |
| 20 | #error iswalnum defined |
| 21 | #endif |
| 22 | |
| 23 | #ifdef iswalpha |
| 24 | #error iswalpha defined |
| 25 | #endif |
| 26 | |
| 27 | #ifdef iswblank |
| 28 | #error iswblank defined |
| 29 | #endif |
| 30 | |
| 31 | #ifdef iswcntrl |
| 32 | #error iswcntrl defined |
| 33 | #endif |
| 34 | |
| 35 | #ifdef iswdigit |
| 36 | #error iswdigit defined |
| 37 | #endif |
| 38 | |
| 39 | #ifdef iswgraph |
| 40 | #error iswgraph defined |
| 41 | #endif |
| 42 | |
| 43 | #ifdef iswlower |
| 44 | #error iswlower defined |
| 45 | #endif |
| 46 | |
| 47 | #ifdef iswprint |
| 48 | #error iswprint defined |
| 49 | #endif |
| 50 | |
| 51 | #ifdef iswpunct |
| 52 | #error iswpunct defined |
| 53 | #endif |
| 54 | |
| 55 | #ifdef iswspace |
| 56 | #error iswspace defined |
| 57 | #endif |
| 58 | |
| 59 | #ifdef iswupper |
| 60 | #error iswupper defined |
| 61 | #endif |
| 62 | |
| 63 | #ifdef iswxdigit |
| 64 | #error iswxdigit defined |
| 65 | #endif |
| 66 | |
| 67 | #ifdef iswctype |
| 68 | #error iswctype defined |
| 69 | #endif |
| 70 | |
| 71 | #ifdef wctype |
| 72 | #error wctype defined |
| 73 | #endif |
| 74 | |
| 75 | #ifdef towlower |
| 76 | #error towlower defined |
| 77 | #endif |
| 78 | |
| 79 | #ifdef towupper |
| 80 | #error towupper defined |
| 81 | #endif |
| 82 | |
| 83 | #ifdef towctrans |
| 84 | #error towctrans defined |
| 85 | #endif |
| 86 | |
| 87 | #ifdef wctrans |
| 88 | #error wctrans defined |
| 89 | #endif |
| 90 | |
| 91 | int main() |
| 92 | { |
| 93 | std::wint_t w = 0; |
| 94 | std::wctrans_t wctr = 0; |
Dan Albert | 9fdc63a | 2014-05-08 10:31:38 -0700 | [diff] [blame^] | 95 | std::wctype_t wct = (std::wctype_t)0; |
Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 96 | static_assert((std::is_same<decltype(std::iswalnum(w)), int>::value), ""); |
| 97 | static_assert((std::is_same<decltype(std::iswalpha(w)), int>::value), ""); |
| 98 | static_assert((std::is_same<decltype(std::iswblank(w)), int>::value), ""); |
| 99 | static_assert((std::is_same<decltype(std::iswcntrl(w)), int>::value), ""); |
| 100 | static_assert((std::is_same<decltype(std::iswdigit(w)), int>::value), ""); |
| 101 | static_assert((std::is_same<decltype(std::iswgraph(w)), int>::value), ""); |
| 102 | static_assert((std::is_same<decltype(std::iswlower(w)), int>::value), ""); |
| 103 | static_assert((std::is_same<decltype(std::iswprint(w)), int>::value), ""); |
| 104 | static_assert((std::is_same<decltype(std::iswpunct(w)), int>::value), ""); |
| 105 | static_assert((std::is_same<decltype(std::iswspace(w)), int>::value), ""); |
| 106 | static_assert((std::is_same<decltype(std::iswupper(w)), int>::value), ""); |
| 107 | static_assert((std::is_same<decltype(std::iswxdigit(w)), int>::value), ""); |
| 108 | static_assert((std::is_same<decltype(std::iswctype(w, wct)), int>::value), ""); |
| 109 | static_assert((std::is_same<decltype(std::wctype("")), std::wctype_t>::value), ""); |
| 110 | static_assert((std::is_same<decltype(std::towlower(w)), std::wint_t>::value), ""); |
| 111 | static_assert((std::is_same<decltype(std::towupper(w)), std::wint_t>::value), ""); |
| 112 | static_assert((std::is_same<decltype(std::towctrans(w, wctr)), std::wint_t>::value), ""); |
| 113 | static_assert((std::is_same<decltype(std::wctrans("")), std::wctrans_t>::value), ""); |
| 114 | } |