Home | History | Annotate | Download | only in classification
      1 //===----------------------------------------------------------------------===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is dual licensed under the MIT and the University of Illinois Open
      6 // Source Licenses. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 
     10 // <locale>
     11 
     12 // template <class charT> bool isprint (charT c, const locale& loc);
     13 
     14 #include <locale>
     15 #include <cassert>
     16 
     17 int main()
     18 {
     19     std::locale l;
     20     assert( std::isprint(' ', l));
     21     assert( std::isprint('<', l));
     22     assert(!std::isprint('\x8', l));
     23     assert( std::isprint('A', l));
     24     assert( std::isprint('a', l));
     25     assert( std::isprint('z', l));
     26     assert( std::isprint('3', l));
     27     assert( std::isprint('.', l));
     28     assert( std::isprint('f', l));
     29     assert( std::isprint('9', l));
     30     assert( std::isprint('+', l));
     31 }
     32