aboutsummaryrefslogtreecommitdiff
path: root/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.pass.cpp')
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.pass.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.pass.cpp
new file mode 100644
index 000000000000..2a714b1d5515
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 ctype<char>;
+
+// char toupper(char) const;
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(l);
+
+ assert(f.toupper(' ') == ' ');
+ assert(f.toupper('A') == 'A');
+ assert(f.toupper('\x07') == '\x07');
+ assert(f.toupper('.') == '.');
+ assert(f.toupper('a') == 'A');
+ assert(f.toupper('1') == '1');
+ }
+}