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.

llvm-svn: 242618
This commit is contained in:
Marshall Clow
2015-07-18 18:24:15 +00:00
parent 980eda3fc2
commit dd2b7a0a0e
2 changed files with 10 additions and 2 deletions

View File

@@ -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');