Fix up typos in a couple of tests; due to agressive short-circuiting, they never...
authorMarshall Clow <mclow.lists@gmail.com>
Sat, 18 Jul 2015 18:24:15 +0000 (18:24 +0000)
committerMarshall Clow <mclow.lists@gmail.com>
Sat, 18 Jul 2015 18:24:15 +0000 (18:24 +0000)
llvm-svn: 242618

libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/overflow.pass.cpp
libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/pbackfail.pass.cpp

index 3abf942..67363b5 100644 (file)
@@ -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');
index 4af0e63..a050900 100644 (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');