Add more tests for std::ws as pointed out by bug #19497
llvm-svn: 206770
This commit is contained in:
parent
de577e3d68
commit
79a770ba45
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue