diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2013-10-31 22:20:45 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2013-10-31 22:20:45 +0000 |
commit | e1bedf4e939995fc190700f4a8a7fa12410c8577 (patch) | |
tree | 8fb53c0442dd52489410c92bcb1f55471600d286 /libcxx/test/input.output | |
parent | fc0447b8e49001e63ff5d24c97270be33d5ffcfb (diff) | |
download | bcm5719-llvm-e1bedf4e939995fc190700f4a8a7fa12410c8577.tar.gz bcm5719-llvm-e1bedf4e939995fc190700f4a8a7fa12410c8577.zip |
LWG issue 2341; Make the two variants of basic_ostream::seekp and basic_istream::seekg behave consistently; update tests to make sure
llvm-svn: 193814
Diffstat (limited to 'libcxx/test/input.output')
2 files changed, 8 insertions, 2 deletions
diff --git a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp index 005b3b48446..73f3da1c6bd 100644 --- a/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp +++ b/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp @@ -57,12 +57,18 @@ int main() is.seekg(5, std::ios_base::cur); assert(is.good()); assert(seekoff_called == 1); + is.seekg(-1, std::ios_base::beg); + assert(is.fail()); + assert(seekoff_called == 2); } { testbuf<wchar_t> sb(L" 123456789"); std::wistream is(&sb); is.seekg(5, std::ios_base::cur); assert(is.good()); - assert(seekoff_called == 2); + assert(seekoff_called == 3); + is.seekg(-1, std::ios_base::beg); + assert(is.fail()); + assert(seekoff_called == 4); } } diff --git a/libcxx/test/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp b/libcxx/test/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp index 16fbf656076..69b26f3a96e 100644 --- a/libcxx/test/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp +++ b/libcxx/test/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp @@ -54,6 +54,6 @@ int main() assert(os.good()); assert(&os.seekp(-1, std::ios_base::beg) == &os); assert(seekoff_called == 2); - assert(os.good()); + assert(os.fail()); } } |