diff options
Diffstat (limited to 'test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp')
-rw-r--r-- | test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp b/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp new file mode 100644 index 000000000000..5c273dc45d2d --- /dev/null +++ b/test/std/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp @@ -0,0 +1,27 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <strstream> + +// class strstream + +// char* str(); + +#include <strstream> +#include <cassert> + +int main() +{ + { + std::strstream out; + out << 123 << ' ' << 4.5 << ' ' << "dog" << std::ends; + assert(out.str() == std::string("123 4.5 dog")); + out.freeze(false); + } +} |