cwctype.pass.cpp revision bc8d3f97eb5c958007f2713238472e0c1c8fe02
18e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul//===----------------------------------------------------------------------===//
28e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul//
3a9bcf751030895494fc098f8d0ff56b2496bd993Brian Paul// ��������������������The LLVM Compiler Infrastructure
48e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul//
5ef8653a83800bc4b8e116e03ad52604097224378Brian Paul// This file is distributed under the University of Illinois Open Source
68e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul// License. See LICENSE.TXT for details.
78e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul//
88e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul//===----------------------------------------------------------------------===//
98e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul
108e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul// <cwctype>
118e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul
128e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#include <cwctype>
138e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#include <type_traits>
148e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul
158e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#ifndef WEOF
168e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#error WEOF not defined
178e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#endif
188e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul
198e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#ifdef iswalnum
208e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#error iswalnum defined
218e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#endif
228e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul
238e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#ifdef iswalpha
248e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#error iswalpha defined
258e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#endif
268e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul
278e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#ifdef iswblank
288e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#error iswblank defined
298e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#endif
30248200737398a7d6403a23930a6c9d93db06b942Brian Paul
3189fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#ifdef iswcntrl
3289fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#error iswcntrl defined
3389fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#endif
3489fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul
3589fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#ifdef iswdigit
3689fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#error iswdigit defined
3789fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#endif
3889fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul
3989fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#ifdef iswgraph
4089fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#error iswgraph defined
4189fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#endif
4289fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul
4389fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#ifdef iswlower
4489fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#error iswlower defined
4589fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#endif
4689fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul
4789fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#ifdef iswprint
4889fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#error iswprint defined
4989fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#endif
5089fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul
5189fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#ifdef iswpunct
5289fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#error iswpunct defined
5389fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#endif
543c63452e64df7e10aa073c6c3b9492b1d7dabbb8Brian Paul
557a6b71ef2944bae1718e8167b2faaceb8422071cBrian Paul#ifdef iswspace
56e75d2424e53d6023f4414e40694cd467e5392b96Brian Paul#error iswspace defined
578e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#endif
588e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul
598e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#ifdef iswupper
608e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#error iswupper defined
6124edd9015951dd41898902b6c3973fe605e5871aBrian Paul#endif
623c63452e64df7e10aa073c6c3b9492b1d7dabbb8Brian Paul
6389fb06fcc11cbe3f23521312155d6c55d869f526Brian Paul#ifdef iswxdigit
64371ef9c058b0d59bfb62689b64af1b29a2214d9eGareth Hughes#error iswxdigit defined
658e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#endif
668e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul
672e5c686c2b6f356895f33b2815e41386946ab55aKeith Whitwell#ifdef iswctype
688e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul#error iswctype defined
69248200737398a7d6403a23930a6c9d93db06b942Brian Paul#endif
70fce0d13b4fff04de50fd91a8f4dfdc248b6262e0Keith Whitwell
71fce0d13b4fff04de50fd91a8f4dfdc248b6262e0Keith Whitwell#ifdef wctype
72fce0d13b4fff04de50fd91a8f4dfdc248b6262e0Keith Whitwell#error wctype defined
73fce0d13b4fff04de50fd91a8f4dfdc248b6262e0Keith Whitwell#endif
7471699df7de8cc732caf6d4b8adb4ab2d1f0c7c1fKeith Whitwell
75248200737398a7d6403a23930a6c9d93db06b942Brian Paul#ifdef towlower
76248200737398a7d6403a23930a6c9d93db06b942Brian Paul#error towlower defined
77248200737398a7d6403a23930a6c9d93db06b942Brian Paul#endif
78248200737398a7d6403a23930a6c9d93db06b942Brian Paul
79248200737398a7d6403a23930a6c9d93db06b942Brian Paul#ifdef towupper
80248200737398a7d6403a23930a6c9d93db06b942Brian Paul#error towupper defined
81248200737398a7d6403a23930a6c9d93db06b942Brian Paul#endif
8271699df7de8cc732caf6d4b8adb4ab2d1f0c7c1fKeith Whitwell
8371699df7de8cc732caf6d4b8adb4ab2d1f0c7c1fKeith Whitwell#ifdef towctrans
8471699df7de8cc732caf6d4b8adb4ab2d1f0c7c1fKeith Whitwell#error towctrans defined
8571699df7de8cc732caf6d4b8adb4ab2d1f0c7c1fKeith Whitwell#endif
8671699df7de8cc732caf6d4b8adb4ab2d1f0c7c1fKeith Whitwell
8771699df7de8cc732caf6d4b8adb4ab2d1f0c7c1fKeith Whitwell#ifdef wctrans
8871699df7de8cc732caf6d4b8adb4ab2d1f0c7c1fKeith Whitwell#error wctrans defined
8971699df7de8cc732caf6d4b8adb4ab2d1f0c7c1fKeith Whitwell#endif
903aea82b396387bf3835f91bcc9121e02274c4c04Keith Whitwell
913aea82b396387bf3835f91bcc9121e02274c4c04Keith Whitwellint main()
923aea82b396387bf3835f91bcc9121e02274c4c04Keith Whitwell{
933aea82b396387bf3835f91bcc9121e02274c4c04Keith Whitwell    std::wint_t w = 0;
943aea82b396387bf3835f91bcc9121e02274c4c04Keith Whitwell    std::wctrans_t wctr = 0;
953aea82b396387bf3835f91bcc9121e02274c4c04Keith Whitwell    std::wctype_t wct = 0;
9671699df7de8cc732caf6d4b8adb4ab2d1f0c7c1fKeith Whitwell    static_assert((std::is_same<decltype(std::iswalnum(w)), int>::value), "");
9771699df7de8cc732caf6d4b8adb4ab2d1f0c7c1fKeith Whitwell    static_assert((std::is_same<decltype(std::iswalpha(w)), int>::value), "");
9871699df7de8cc732caf6d4b8adb4ab2d1f0c7c1fKeith Whitwell    static_assert((std::is_same<decltype(std::iswblank(w)), int>::value), "");
9971699df7de8cc732caf6d4b8adb4ab2d1f0c7c1fKeith Whitwell    static_assert((std::is_same<decltype(std::iswcntrl(w)), int>::value), "");
10071699df7de8cc732caf6d4b8adb4ab2d1f0c7c1fKeith Whitwell    static_assert((std::is_same<decltype(std::iswdigit(w)), int>::value), "");
10171699df7de8cc732caf6d4b8adb4ab2d1f0c7c1fKeith Whitwell    static_assert((std::is_same<decltype(std::iswgraph(w)), int>::value), "");
1023aea82b396387bf3835f91bcc9121e02274c4c04Keith Whitwell    static_assert((std::is_same<decltype(std::iswlower(w)), int>::value), "");
1033aea82b396387bf3835f91bcc9121e02274c4c04Keith Whitwell    static_assert((std::is_same<decltype(std::iswprint(w)), int>::value), "");
104fce0d13b4fff04de50fd91a8f4dfdc248b6262e0Keith Whitwell    static_assert((std::is_same<decltype(std::iswpunct(w)), int>::value), "");
105fce0d13b4fff04de50fd91a8f4dfdc248b6262e0Keith Whitwell    static_assert((std::is_same<decltype(std::iswspace(w)), int>::value), "");
106fce0d13b4fff04de50fd91a8f4dfdc248b6262e0Keith Whitwell    static_assert((std::is_same<decltype(std::iswupper(w)), int>::value), "");
107fce0d13b4fff04de50fd91a8f4dfdc248b6262e0Keith Whitwell    static_assert((std::is_same<decltype(std::iswxdigit(w)), int>::value), "");
108fce0d13b4fff04de50fd91a8f4dfdc248b6262e0Keith Whitwell    static_assert((std::is_same<decltype(std::iswctype(w, wct)), int>::value), "");
109fce0d13b4fff04de50fd91a8f4dfdc248b6262e0Keith Whitwell    static_assert((std::is_same<decltype(std::wctype("")), std::wctype_t>::value), "");
110fce0d13b4fff04de50fd91a8f4dfdc248b6262e0Keith Whitwell    static_assert((std::is_same<decltype(std::towlower(w)), std::wint_t>::value), "");
1113aea82b396387bf3835f91bcc9121e02274c4c04Keith Whitwell    static_assert((std::is_same<decltype(std::towupper(w)), std::wint_t>::value), "");
1123aea82b396387bf3835f91bcc9121e02274c4c04Keith Whitwell    static_assert((std::is_same<decltype(std::towctrans(w, wctr)), std::wint_t>::value), "");
1133aea82b396387bf3835f91bcc9121e02274c4c04Keith Whitwell    static_assert((std::is_same<decltype(std::wctrans("")), std::wctrans_t>::value), "");
1143aea82b396387bf3835f91bcc9121e02274c4c04Keith Whitwell}
1153aea82b396387bf3835f91bcc9121e02274c4c04Keith Whitwell