Add more tests for std::ws as pointed out by bug #19497

llvm-svn: 206770
This commit is contained in:
Marshall Clow 2014-04-21 18:12:09 +00:00
parent de577e3d68
commit 79a770ba45
1 changed files with 20 additions and 0 deletions

View File

@ -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());
}
}