summaryrefslogtreecommitdiffstats
path: root/libcxx/test/input.output/iostreams.base/std.ios.manip
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2010-05-11 19:42:16 +0000
committerHoward Hinnant <hhinnant@apple.com>2010-05-11 19:42:16 +0000
commit3e519524c118651123eecf60c2bbc5d65ad9bac3 (patch)
treeb2dd4168cfe448920a602cd7d2e40f95da187153 /libcxx/test/input.output/iostreams.base/std.ios.manip
parent9132c59d43b6c590c9bb33496eebf9f192d6857a (diff)
downloadbcm5719-llvm-3e519524c118651123eecf60c2bbc5d65ad9bac3.tar.gz
bcm5719-llvm-3e519524c118651123eecf60c2bbc5d65ad9bac3.zip
libcxx initial import
llvm-svn: 103490
Diffstat (limited to 'libcxx/test/input.output/iostreams.base/std.ios.manip')
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/internal.pass.cpp29
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/left.pass.cpp29
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/right.pass.cpp29
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/dec.pass.cpp29
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/hex.pass.cpp29
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/oct.pass.cpp29
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/iostream_category.pass.cpp23
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_code.pass.cpp24
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_condition.pass.cpp24
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/defaultfloat.pass.cpp30
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/fixed.pass.cpp29
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/hexfloat.pass.cpp30
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/scientific.pass.cpp29
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/boolalpha.pass.cpp29
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noboolalpha.pass.cpp30
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowbase.pass.cpp30
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpoint.pass.cpp30
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpos.pass.cpp30
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noskipws.pass.cpp30
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nounitbuf.pass.cpp30
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nouppercase.pass.cpp30
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showbase.pass.cpp29
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpoint.pass.cpp29
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpos.pass.cpp29
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/skipws.pass.cpp29
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/unitbuf.pass.cpp29
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/uppercase.pass.cpp29
-rw-r--r--libcxx/test/input.output/iostreams.base/std.ios.manip/nothing_to_do.pass.cpp12
28 files changed, 788 insertions, 0 deletions
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/internal.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/internal.pass.cpp
new file mode 100644
index 00000000000..67eabb6a3d7
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/internal.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& internal(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::ios_base& r = std::internal(ios);
+ assert(&r == &ios);
+ assert(ios.flags() & std::ios::internal);
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/left.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/left.pass.cpp
new file mode 100644
index 00000000000..3bf05c808ba
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/left.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& left(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::ios_base& r = std::left(ios);
+ assert(&r == &ios);
+ assert(ios.flags() & std::ios::left);
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/right.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/right.pass.cpp
new file mode 100644
index 00000000000..25ca737c29c
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/adjustfield.manip/right.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& right(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::ios_base& r = std::right(ios);
+ assert(&r == &ios);
+ assert(ios.flags() & std::ios::right);
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/dec.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/dec.pass.cpp
new file mode 100644
index 00000000000..74e114beb76
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/dec.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& dec(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::ios_base& r = std::dec(ios);
+ assert(&r == &ios);
+ assert(ios.flags() & std::ios::dec);
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/hex.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/hex.pass.cpp
new file mode 100644
index 00000000000..c1ca0d6c441
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/hex.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& hex(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::ios_base& r = std::hex(ios);
+ assert(&r == &ios);
+ assert(ios.flags() & std::ios::hex);
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/oct.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/oct.pass.cpp
new file mode 100644
index 00000000000..6c020e7a02c
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/basefield.manip/oct.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& oct(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::ios_base& r = std::oct(ios);
+ assert(&r == &ios);
+ assert(ios.flags() & std::ios::oct);
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/iostream_category.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/iostream_category.pass.cpp
new file mode 100644
index 00000000000..bfed3f4cc20
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/iostream_category.pass.cpp
@@ -0,0 +1,23 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// const error_category& iostream_category();
+
+#include <ios>
+#include <cassert>
+#include <string>
+
+int main()
+{
+ const std::error_category& e_cat1 = std::iostream_category();
+ std::string m1 = e_cat1.name();
+ assert(m1 == "iostream");
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_code.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_code.pass.cpp
new file mode 100644
index 00000000000..f404cb10896
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_code.pass.cpp
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// error_code make_error_code(io_errc e);
+
+#include <ios>
+#include <cassert>
+
+int main()
+{
+ {
+ std::error_code ec = make_error_code(std::io_errc::stream);
+ assert(ec.value() == static_cast<int>(std::io_errc::stream));
+ assert(ec.category() == std::iostream_category());
+ }
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_condition.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_condition.pass.cpp
new file mode 100644
index 00000000000..0024984a346
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_condition.pass.cpp
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// error_condition make_error_condition(io_errc e);
+
+#include <ios>
+#include <cassert>
+
+int main()
+{
+ {
+ const std::error_condition ec1 = std::make_error_condition(std::io_errc::stream);
+ assert(ec1.value() == static_cast<int>(std::io_errc::stream));
+ assert(ec1.category() == std::iostream_category());
+ }
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/defaultfloat.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/defaultfloat.pass.cpp
new file mode 100644
index 00000000000..3b8b967491c
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/defaultfloat.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& defaultfloat(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::ios_base& r = std::defaultfloat(ios);
+ assert(&r == &ios);
+ assert(!(ios.flags() & std::ios::fixed));
+ assert(!(ios.flags() & std::ios::scientific));
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/fixed.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/fixed.pass.cpp
new file mode 100644
index 00000000000..2b704e4bfe7
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/fixed.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& fixed(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::ios_base& r = std::fixed(ios);
+ assert(&r == &ios);
+ assert(ios.flags() & std::ios::fixed);
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/hexfloat.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/hexfloat.pass.cpp
new file mode 100644
index 00000000000..c849e86ef0a
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/hexfloat.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& hexfloat(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::ios_base& r = std::hexfloat(ios);
+ assert(&r == &ios);
+ assert(ios.flags() & std::ios::fixed);
+ assert(ios.flags() & std::ios::scientific);
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/scientific.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/scientific.pass.cpp
new file mode 100644
index 00000000000..e20e993bf86
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/floatfield.manip/scientific.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& scientific(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::ios_base& r = std::scientific(ios);
+ assert(&r == &ios);
+ assert(ios.flags() & std::ios::scientific);
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/boolalpha.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/boolalpha.pass.cpp
new file mode 100644
index 00000000000..08734cf7867
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/boolalpha.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& boolalpha(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::ios_base& r = std::boolalpha(ios);
+ assert(&r == &ios);
+ assert(ios.flags() & std::ios::boolalpha);
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noboolalpha.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noboolalpha.pass.cpp
new file mode 100644
index 00000000000..4f31343b302
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noboolalpha.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& noboolalpha(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::boolalpha(ios);
+ std::ios_base& r = std::noboolalpha(ios);
+ assert(&r == &ios);
+ assert(!(ios.flags() & std::ios::boolalpha));
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowbase.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowbase.pass.cpp
new file mode 100644
index 00000000000..fe47b6c48d3
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowbase.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& noshowbase(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::showbase(ios);
+ std::ios_base& r = std::noshowbase(ios);
+ assert(&r == &ios);
+ assert(!(ios.flags() & std::ios::showbase));
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpoint.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpoint.pass.cpp
new file mode 100644
index 00000000000..71cdc500800
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpoint.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& noshowpoint(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::showpoint(ios);
+ std::ios_base& r = std::noshowpoint(ios);
+ assert(&r == &ios);
+ assert(!(ios.flags() & std::ios::showpoint));
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpos.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpos.pass.cpp
new file mode 100644
index 00000000000..902506e1106
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpos.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& noshowpos(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::showpos(ios);
+ std::ios_base& r = std::noshowpos(ios);
+ assert(&r == &ios);
+ assert(!(ios.flags() & std::ios::showpos));
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noskipws.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noskipws.pass.cpp
new file mode 100644
index 00000000000..2e2c3a691e8
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noskipws.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& noskipws(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::skipws(ios);
+ std::ios_base& r = std::noskipws(ios);
+ assert(&r == &ios);
+ assert(!(ios.flags() & std::ios::skipws));
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nounitbuf.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nounitbuf.pass.cpp
new file mode 100644
index 00000000000..ddfaee549b2
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nounitbuf.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& nounitbuf(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::unitbuf(ios);
+ std::ios_base& r = std::nounitbuf(ios);
+ assert(&r == &ios);
+ assert(!(ios.flags() & std::ios::unitbuf));
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nouppercase.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nouppercase.pass.cpp
new file mode 100644
index 00000000000..864dcc4b879
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/nouppercase.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& nouppercase(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::uppercase(ios);
+ std::ios_base& r = std::nouppercase(ios);
+ assert(&r == &ios);
+ assert(!(ios.flags() & std::ios::uppercase));
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showbase.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showbase.pass.cpp
new file mode 100644
index 00000000000..84fe15b9de2
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showbase.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& showbase(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::ios_base& r = std::showbase(ios);
+ assert(&r == &ios);
+ assert(ios.flags() & std::ios::showbase);
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpoint.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpoint.pass.cpp
new file mode 100644
index 00000000000..ce6ef8cdeb5
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpoint.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& showpoint(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::ios_base& r = std::showpoint(ios);
+ assert(&r == &ios);
+ assert(ios.flags() & std::ios::showpoint);
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpos.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpos.pass.cpp
new file mode 100644
index 00000000000..74665afee69
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/showpos.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& showpos(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::ios_base& r = std::showpos(ios);
+ assert(&r == &ios);
+ assert(ios.flags() & std::ios::showpos);
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/skipws.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/skipws.pass.cpp
new file mode 100644
index 00000000000..71c47f4ee32
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/skipws.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& skipws(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::ios_base& r = std::skipws(ios);
+ assert(&r == &ios);
+ assert(ios.flags() & std::ios::skipws);
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/unitbuf.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/unitbuf.pass.cpp
new file mode 100644
index 00000000000..a931cc42956
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/unitbuf.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& unitbuf(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::ios_base& r = std::unitbuf(ios);
+ assert(&r == &ios);
+ assert(ios.flags() & std::ios::unitbuf);
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/uppercase.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/uppercase.pass.cpp
new file mode 100644
index 00000000000..653bd1c64ad
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip/uppercase.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+
+// class ios_base
+
+// ios_base& uppercase(ios_base& str);
+
+#include <ios>
+#include <streambuf>
+#include <cassert>
+
+struct testbuf : public std::streambuf {};
+
+int main()
+{
+ testbuf sb;
+ std::ios ios(&sb);
+ std::ios_base& r = std::uppercase(ios);
+ assert(&r == &ios);
+ assert(ios.flags() & std::ios::uppercase);
+}
diff --git a/libcxx/test/input.output/iostreams.base/std.ios.manip/nothing_to_do.pass.cpp b/libcxx/test/input.output/iostreams.base/std.ios.manip/nothing_to_do.pass.cpp
new file mode 100644
index 00000000000..fa4d462f18d
--- /dev/null
+++ b/libcxx/test/input.output/iostreams.base/std.ios.manip/nothing_to_do.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+int main()
+{
+}
OpenPOWER on IntegriCloud