summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/localization/locales/locale.convenience/classification/isgraph.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/localization/locales/locale.convenience/classification/isgraph.pass.cpp')
-rw-r--r--libcxx/test/std/localization/locales/locale.convenience/classification/isgraph.pass.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/libcxx/test/std/localization/locales/locale.convenience/classification/isgraph.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/classification/isgraph.pass.cpp
new file mode 100644
index 00000000000..b294aa537aa
--- /dev/null
+++ b/libcxx/test/std/localization/locales/locale.convenience/classification/isgraph.pass.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <locale>
+
+// template <class charT> bool isgraph (charT c, const locale& loc);
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ std::locale l;
+ assert(!std::isgraph(' ', l));
+ assert( std::isgraph('<', l));
+ assert(!std::isgraph('\x8', l));
+ assert( std::isgraph('A', l));
+ assert( std::isgraph('a', l));
+ assert( std::isgraph('z', l));
+ assert( std::isgraph('3', l));
+ assert( std::isgraph('.', l));
+ assert( std::isgraph('f', l));
+ assert( std::isgraph('9', l));
+ assert( std::isgraph('+', l));
+}
OpenPOWER on IntegriCloud