sum_diff.cc: Use VERIFY.
authorPaolo Carlini <pcarlini@suse.de>
Thu, 18 Nov 2004 19:11:41 +0000 (19:11 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 18 Nov 2004 19:11:41 +0000 (19:11 +0000)
2004-11-18  Paolo Carlini  <pcarlini@suse.de>

* testsuite/26_numerics/numeric/sum_diff.cc: Use VERIFY.
* testsuite/ext/array_allocator/1.cc: Likewise.
* testsuite/ext/array_allocator/2.cc: Likewise.
* testsuite/ext/array_allocator/3.cc: Likewise.
* testsuite/ext/enc_filebuf/char/13598.cc: Likewise.

From-SVN: r90878

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/26_numerics/numeric/sum_diff.cc
libstdc++-v3/testsuite/ext/array_allocator/1.cc
libstdc++-v3/testsuite/ext/array_allocator/2.cc
libstdc++-v3/testsuite/ext/array_allocator/3.cc
libstdc++-v3/testsuite/ext/enc_filebuf/char/13598.cc

index 09e20fc9781571a2273fca712205e945e6fdc36c..638c420e0c983f3fa14f4c0d30727990ea9b1051 100644 (file)
@@ -1,3 +1,11 @@
+2004-11-18  Paolo Carlini  <pcarlini@suse.de>
+
+       * testsuite/26_numerics/numeric/sum_diff.cc: Use VERIFY.
+       * testsuite/ext/array_allocator/1.cc: Likewise.
+       * testsuite/ext/array_allocator/2.cc: Likewise.
+       * testsuite/ext/array_allocator/3.cc: Likewise.
+       * testsuite/ext/enc_filebuf/char/13598.cc: Likewise.
+
 2004-11-18  Paolo Carlini  <pcarlini@suse.de>
 
        * include/bits/locale_facets.tcc (num_get<>::do_get(void*&)):
index 9a4cf68c1d5b0cc880ec069d0a61401b3b56807c..64690be500b1be63a457b4b4da8054dd6f17a605 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -21,7 +21,7 @@
 
 #include <algorithm>
 #include <numeric>
-#include <cassert>
+#include <testsuite_hooks.h>
 
 int A[] = {1, 4, 9, 16, 25, 36, 49, 64, 81, 100};
 int B[] = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19};
@@ -30,13 +30,15 @@ const int N = sizeof(A) / sizeof(int);
 void
 test01()
 {
-    int D[N];
+  bool test __attribute__((unused)) = true;
 
-    std::adjacent_difference(A, A + N, D);
-    assert(std::equal(D, D + N, B));
+  int D[N];
 
-    std::partial_sum(D, D + N, D);
-    assert(std::equal(D, D + N, A));
+  std::adjacent_difference(A, A + N, D);
+  VERIFY( std::equal(D, D + N, B) );
+  
+  std::partial_sum(D, D + N, D);
+  VERIFY( std::equal(D, D + N, A) );
 }
 
 int
index 68cbc73f3f7a4bf0194607857e8fcc296ca72dbf..e0ea6f5ab1339e652827c60cd53ea9b737901e4c 100644 (file)
@@ -25,9 +25,9 @@
 // invalidate any other reasons why the executable file might be covered by
 // the GNU General Public License.
 
-#include <cassert>
 #include <string>
 #include <ext/array_allocator.h>
+#include <testsuite_hooks.h>
 
 typedef char char_type;
 typedef std::char_traits<char_type> traits_type;
@@ -37,6 +37,8 @@ array_type extern_array;
 
 void test01() 
 {
+  bool test __attribute__((unused)) = true;
+  
   using std::basic_string;
   typedef __gnu_cxx::array_allocator<char_type, array_type> allocator_type;
   typedef basic_string<char_type, traits_type, allocator_type> string_type;
@@ -50,11 +52,11 @@ void test01()
     }
   catch(std::bad_alloc& obj)
     {
-      assert(true);
+      VERIFY( true );
     }
   catch(...)
     {
-      assert(false);
+      VERIFY( false );
     }
 }
 
index 9ee2d07d5544a805fa95f337759bf363e6b64424..74b2bc9a802c9b1f37879fe0ca06d34611b7581a 100644 (file)
 // invalidate any other reasons why the executable file might be covered by
 // the GNU General Public License.
 
-#include <cassert>
 #include <string>
 #include <iostream>
 #include <ext/array_allocator.h>
+#include <testsuite_hooks.h>
 
 typedef char char_type;
 typedef std::char_traits<char_type> traits_type;
@@ -38,6 +38,8 @@ array_type extern_array;
 
 void test01() 
 {
+  bool test __attribute__((unused)) = true;
+
   using std::basic_string;
   typedef __gnu_cxx::array_allocator<char_type, array_type> allocator_type;
   typedef basic_string<char_type, traits_type, allocator_type> string_type;
@@ -52,11 +54,11 @@ void test01()
     }
   catch(std::bad_alloc& obj)
     {
-      assert(false);
+      VERIFY( false );
     }
   catch(...)
     {
-      assert(false);
+      VERIFY( false );
     }
 
   s.append(1, 'c');
index 297b902c8835a5c1dafee1433de777d2a99cffff..97ffbb467c56ff3026796dcf774caa9ca42be0f6 100644 (file)
@@ -25,9 +25,9 @@
 // invalidate any other reasons why the executable file might be covered by
 // the GNU General Public License.
 
-#include <cassert>
 #include <string>
 #include <ext/array_allocator.h>
+#include <testsuite_hooks.h>
 
 typedef char char_type;
 typedef std::char_traits<char_type> traits_type;
@@ -37,6 +37,8 @@ array_type extern_array;
 
 void test01() 
 {
+  bool test __attribute__((unused)) = true;
+
   using std::basic_string;
   typedef __gnu_cxx::array_allocator<char_type, array_type> allocator_type;
   typedef basic_string<char_type, traits_type, allocator_type> string_type;
@@ -51,11 +53,11 @@ void test01()
     }
   catch(std::bad_alloc& obj)
     {
-      assert(true);
+      VERIFY( true );
     }
   catch(...)
     {
-      assert(false);
+      VERIFY( false );
     }
 }
 
index a9270e145bbe00acc3db3424389b115f4d7170ea..70f83e1bda359ac423494dc509f06425dbd82f84 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <locale>
 #include <cstring>
-#include <cassert>
+#include <testsuite_hooks.h>
 #ifdef _GLIBCXX_USE___ENC_TRAITS
 #include <ext/enc_filebuf.h>
 #endif
@@ -26,8 +26,9 @@
 int main()
 {
 #ifdef _GLIBCXX_USE___ENC_TRAITS
-  const char* str = "Hello, world!\n";
+  bool test __attribute__((unused)) = true;
 
+  const char* str = "Hello, world!\n";
   std::locale loc(std::locale::classic(),
                  new std::codecvt<char, char, std::__enc_traits>());
   std::__enc_traits st("ISO-8859-1", "ISO-8859-1");
@@ -39,8 +40,8 @@ int main()
   int s = fb.pubsync();
   fb.close();
   
-  assert(n == std::strlen(str));
-  assert(s == 0);
+  VERIFY( n == std::strlen(str) );
+  VERIFY( s == 0 );
 #endif
   
   return 0;