summaryrefslogtreecommitdiffstats
path: root/libcxx
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2015-10-07 19:41:24 +0000
committerMarshall Clow <mclow.lists@gmail.com>2015-10-07 19:41:24 +0000
commit2a7b00e1667ce72d20dcd5fe83a7f124e57be0ee (patch)
treefb1255ce75eab152aec15a6ef93f12b3f2650283 /libcxx
parent2cac5843a02917529ba55a030ff21f765e51ec58 (diff)
downloadbcm5719-llvm-2a7b00e1667ce72d20dcd5fe83a7f124e57be0ee.tar.gz
bcm5719-llvm-2a7b00e1667ce72d20dcd5fe83a7f124e57be0ee.zip
While researching LWG#2244, I noticed we weren't testing that eofbit was being cleared. Now we are
llvm-svn: 249593
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp9
1 files changed, 9 insertions, 0 deletions
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<char> sb(" 123456789");
+ std::istream is(&sb);
+ is.setstate(std::ios_base::eofbit);
+ assert(is.eof());
+ is.seekg(5);
+ assert(is.good());
+ assert(!is.eof());
+ }
}
OpenPOWER on IntegriCloud