Add more tests for std::ws as pointed out by bug #19497
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@206770 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user