]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc
testsuite_hooks.h: Rewrite VERIFY in terms of __builtin_printf and __builtin_abort.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 27_io / basic_filebuf / imbue / char / 13171-2.cc
index fdd1a7e9e2f8ed4ff4347e195fc7ddcd0d04ab0e..ecda598d8b79ae0416a64ecf00e8db8fbc993b85 100644 (file)
 #include <sys/types.h>
 #include <sys/stat.h>
 
-// No asserts, avoid leaking the semaphores if a VERIFY fails.
-#undef _GLIBCXX_ASSERT
-
 #include <testsuite_hooks.h>
 
 // libstdc++/13171
 bool test01()
 {
-  bool test __attribute__((unused)) = true;
+  bool test = true;
   using namespace std;
   using namespace __gnu_test;
 
@@ -66,11 +63,11 @@ bool test01()
   fb.pubimbue(loc_fr);
   fb.open(name, ios_base::in);
   s1.wait();
-  VERIFY( fb.is_open() );
+  test &= bool( fb.is_open() );
   fb.pubimbue(loc_en);
   filebuf::int_type c = fb.sgetc();
   fb.close();
-  VERIFY( c == 'S' );
+  test &= bool( c == 'S' );
   s2.signal();
 
   return test;