diff options
Diffstat (limited to 'libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpoint.pass.cpp')
-rw-r--r-- | libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpoint.pass.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpoint.pass.cpp b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpoint.pass.cpp new file mode 100644 index 00000000000..6e26416c5cd --- /dev/null +++ b/libcxx/test/std/input.output/iostreams.base/std.ios.manip/fmtflags.manip/noshowpoint.pass.cpp @@ -0,0 +1,30 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <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)); +} |