//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // template class ctype; // bool is(mask m, charT c) const; #include #include #include "test_macros.h" int main(int, char**) { std::locale l = std::locale::classic(); { typedef std::ctype F; const F& f = std::use_facet(l); assert(f.is(F::space, L' ')); assert(!f.is(F::space, L'A')); assert(f.is(F::print, L' ')); assert(!f.is(F::print, L'\x07')); assert(f.is(F::cntrl, L'\x07')); assert(!f.is(F::cntrl, L' ')); assert(f.is(F::upper, L'A')); assert(!f.is(F::upper, L'a')); assert(f.is(F::lower, L'a')); assert(!f.is(F::lower, L'A')); assert(f.is(F::alpha, L'a')); assert(!f.is(F::alpha, L'1')); assert(f.is(F::digit, L'1')); assert(!f.is(F::digit, L'a')); assert(f.is(F::punct, L'.')); assert(!f.is(F::punct, L'a')); assert(f.is(F::xdigit, L'a')); assert(!f.is(F::xdigit, L'g')); assert(f.is(F::alnum, L'a')); assert(!f.is(F::alnum, L'.')); assert(f.is(F::graph, L'.')); assert(!f.is(F::graph, L'\x07')); } return 0; }