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