diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2014-04-21 18:12:09 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2014-04-21 18:12:09 +0000 |
commit | 79a770ba45c6d31bd4f67d3379185b6f11ae2fb4 (patch) | |
tree | e82bb8f6a5c780da685b4b6ad72dbc3a6cc71172 | |
parent | de577e3d68f4bf4c6af6ffa964840eb88f67373f (diff) | |
download | bcm5719-llvm-79a770ba45c6d31bd4f67d3379185b6f11ae2fb4.tar.gz bcm5719-llvm-79a770ba45c6d31bd4f67d3379185b6f11ae2fb4.zip |
Add more tests for std::ws as pointed out by bug #19497
llvm-svn: 206770
-rw-r--r-- | libcxx/test/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp index d1fd89b6854..3c8159a6d7c 100644 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp +++ b/libcxx/test/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp @@ -56,4 +56,24 @@ int main() assert(is.good()); assert(is.peek() == L'1'); } + { + testbuf<char> sb(" "); + std::istream is(&sb); + ws(is); + assert(!is.fail()); + assert(is.eof()); + ws(is); + assert(is.eof()); + assert(is.fail()); + } + { + testbuf<wchar_t> sb(L" "); + std::wistream is(&sb); + ws(is); + assert(!is.fail()); + assert(is.eof()); + ws(is); + assert(is.eof()); + assert(is.fail()); + } } |