Fix up typos in a couple of tests; due to agressive short-circuiting, they never failed on clang or gcc, but MSVC whined. Patch by Andrew Parker.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242618 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7d439a455d
commit
0f7221ccb8
@ -29,7 +29,7 @@ struct testbuf
|
||||
: base(str, which) {}
|
||||
|
||||
typename base::int_type
|
||||
overflow(typename base::int_type c = base::type_traits::eof())
|
||||
overflow(typename base::int_type c = base::traits_type::eof())
|
||||
{++overflow_called; return base::overflow(c);}
|
||||
|
||||
void pbump(int n) {base::pbump(n);}
|
||||
@ -37,6 +37,10 @@ struct testbuf
|
||||
|
||||
int main()
|
||||
{
|
||||
{ // sanity check
|
||||
testbuf<char> tb("");;
|
||||
tb.overflow();
|
||||
}
|
||||
{
|
||||
testbuf<char> sb("abc");
|
||||
assert(sb.sputc('1') == '1');
|
||||
|
@ -27,7 +27,7 @@ struct testbuf
|
||||
: base(str, which) {}
|
||||
|
||||
typename base::int_type
|
||||
pbackfail(typename base::int_type c = base::type_traits::eof())
|
||||
pbackfail(typename base::int_type c = base::traits_type::eof())
|
||||
{return base::pbackfail(c);}
|
||||
|
||||
void pbump(int n) {base::pbump(n);}
|
||||
@ -35,6 +35,10 @@ struct testbuf
|
||||
|
||||
int main()
|
||||
{
|
||||
{ // sanity check
|
||||
testbuf<char> tb("");;
|
||||
tb.pbackfail();
|
||||
}
|
||||
{
|
||||
testbuf<char> sb("123", std::ios_base::in);
|
||||
assert(sb.sgetc() == '1');
|
||||
|
Loading…
x
Reference in New Issue
Block a user