libcxx initial import
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103490 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp
new file mode 100644
index 0000000..56dcd0c
--- /dev/null
+++ b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <locale>
+
+// template <> class codecvt<char32_t, char, mbstate_t>
+
+// result in(stateT& state,
+// const externT* from, const externT* from_end, const externT*& from_next,
+// internT* to, internT* to_end, internT*& to_next) const;
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+typedef std::codecvt<char32_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const char from[] = "some text";
+ F::intern_type to[9];
+ const F& f = std::use_facet<F>(l);
+ std::mbstate_t mbs;
+ const char* from_next = 0;
+ F::intern_type* to_next = 0;
+ assert(f.in(mbs, from, from + 9, from_next,
+ to, to + 9, to_next) == F::ok);
+ assert(from_next - from == 9);
+ assert(to_next - to == 9);
+ for (unsigned i = 0; i < 9; ++i)
+ assert(to[i] == from[i]);
+}