diff options
Diffstat (limited to 'libcxx/test/input.output/iostreams.base/std.ios.manip/fmtflags.manip')
14 files changed, 413 insertions, 0 deletions
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); +} |