From 2a7b00e1667ce72d20dcd5fe83a7f124e57be0ee Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Wed, 7 Oct 2015 19:41:24 +0000 Subject: While researching LWG#2244, I noticed we weren't testing that eofbit was being cleared. Now we are llvm-svn: 249593 --- .../input.streams/istream.unformatted/seekg.pass.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libcxx') diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp index e6f4e1e4c19..dc4e0ba0de2 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp @@ -63,4 +63,13 @@ int main() is.seekg(-1); assert(is.fail()); } + { + testbuf sb(" 123456789"); + std::istream is(&sb); + is.setstate(std::ios_base::eofbit); + assert(is.eof()); + is.seekg(5); + assert(is.good()); + assert(!is.eof()); + } } -- cgit v1.2.1