Fix LWG#2244: basic_istream::seekg

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251246 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2015-10-25 18:31:51 +00:00
parent fd33deb083
commit dbef2bb1d0
3 changed files with 11 additions and 1 deletions

View File

@@ -71,4 +71,13 @@ int main()
assert(is.fail());
assert(seekoff_called == 4);
}
{
testbuf<char> sb(" 123456789");
std::istream is(&sb);
is.setstate(std::ios_base::eofbit);
assert(is.eof());
is.seekg(5, std::ios_base::beg);
assert(is.good());
assert(!is.eof());
}
}