9555-ic.cc: Clarify assertion, set test variable to false before assert.
authorBenjamin Kosnik <bkoz@redhat.com>
Mon, 19 Apr 2004 19:00:09 +0000 (19:00 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Mon, 19 Apr 2004 19:00:09 +0000 (19:00 +0000)
2004-04-19  Benjamin Kosnik  <bkoz@redhat.com>

* testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
Clarify assertion, set test variable to false before assert.
* testsuite/27_io/basic_istringstream/str/char/1.cc: Same.
* testsuite/27_io/basic_stringstream/str/char/1.cc: Same.
* testsuite/27_io/ios_base/storage/2.cc: Same.

* testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc: Fix
function returns.
* testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Same.
* testsuite/27_io/fpos/14320-3.cc: Same.

* testsuite/27_io/basic_filebuf/2.cc: Instantiate in namespace std.
* testsuite/27_io/fpos/1.cc: Same.
* testsuite/27_io/basic_stringstream/2.cc: Same.
* testsuite/27_io/basic_stringbuf/4.cc: Same.
* testsuite/27_io/basic_stringbuf/1.cc: Same.
* testsuite/27_io/basic_stringbuf/2.cc: Same.
* testsuite/27_io/basic_streambuf/2.cc: Same.
* testsuite/27_io/basic_ostringstream/2.cc: Same.
* testsuite/27_io/basic_ostream/2.cc: Same.
* testsuite/27_io/basic_ofstream/2.cc: Same.
* testsuite/27_io/basic_istringstream/2.cc: Same.
* testsuite/27_io/basic_istream/2.cc: Same.
* testsuite/27_io/basic_iostream/2.cc: Same.
* testsuite/27_io/basic_ios/2.cc: Same.
* testsuite/27_io/basic_ifstream/2.cc: Same.
* testsuite/27_io/basic_fstream/2.cc: Same.
* testsuite/ext/stdio_filebuf/char/1.cc: Same, in namespace __gnu_cxx.

* testsuite/21_strings/basic_string/capacity/1.cc: Don't compare
unsigned against zero.
* testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/capacity/char/1.cc: Same.

* testsuite/18_support/new_delete_placement.cc: Initialize
variables before first use.
* testsuite/21_strings/char_traits/requirements/wchar_t/1.cc: Same.
* testsuite/21_strings/char_traits/requirements/char/1.cc: Same.
* testsuite/21_strings/char_traits/requirements/short/1.cc: Same.
* testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc:
Same.
* testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_badbit_throw.cc: Same.
* testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc:
Same.
* testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_failbit_throw.cc: Same.
* testsuite/27_io/types/2.cc: Same.

* testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: Fix temporary
file name.
* testsuite/27_io/fpos/14775.cc: Same.

From-SVN: r80861

39 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/18_support/new_delete_placement.cc
libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc
libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/1.cc
libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/1.cc
libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc
libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc
libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc
libstdc++-v3/testsuite/27_io/basic_filebuf/2.cc
libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc
libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc
libstdc++-v3/testsuite/27_io/basic_fstream/2.cc
libstdc++-v3/testsuite/27_io/basic_ifstream/2.cc
libstdc++-v3/testsuite/27_io/basic_ios/2.cc
libstdc++-v3/testsuite/27_io/basic_iostream/2.cc
libstdc++-v3/testsuite/27_io/basic_istream/2.cc
libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc
libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc
libstdc++-v3/testsuite/27_io/basic_istringstream/2.cc
libstdc++-v3/testsuite/27_io/basic_istringstream/str/char/1.cc
libstdc++-v3/testsuite/27_io/basic_ofstream/2.cc
libstdc++-v3/testsuite/27_io/basic_ostream/2.cc
libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_badbit_throw.cc
libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_failbit_throw.cc
libstdc++-v3/testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc
libstdc++-v3/testsuite/27_io/basic_ostringstream/2.cc
libstdc++-v3/testsuite/27_io/basic_streambuf/2.cc
libstdc++-v3/testsuite/27_io/basic_stringbuf/1.cc
libstdc++-v3/testsuite/27_io/basic_stringbuf/2.cc
libstdc++-v3/testsuite/27_io/basic_stringbuf/4.cc
libstdc++-v3/testsuite/27_io/basic_stringstream/2.cc
libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/1.cc
libstdc++-v3/testsuite/27_io/fpos/1.cc
libstdc++-v3/testsuite/27_io/fpos/14320-3.cc
libstdc++-v3/testsuite/27_io/fpos/14775.cc
libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc
libstdc++-v3/testsuite/27_io/types/2.cc
libstdc++-v3/testsuite/ext/stdio_filebuf/char/1.cc
libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc

index 0654d76f201622c640d041853be168968c426b08..446ae404c43124d78df0b0b61e5c2f5043a9e505 100644 (file)
@@ -1,3 +1,56 @@
+2004-04-19  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc: 
+       Clarify assertion, set test variable to false before assert.
+       * testsuite/27_io/basic_istringstream/str/char/1.cc: Same.
+       * testsuite/27_io/basic_stringstream/str/char/1.cc: Same.
+       * testsuite/27_io/ios_base/storage/2.cc: Same.
+       
+       * testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc: Fix
+       function returns.
+       * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Same.
+       * testsuite/27_io/fpos/14320-3.cc: Same.
+       
+       * testsuite/27_io/basic_filebuf/2.cc: Instantiate in namespace std.
+       * testsuite/27_io/fpos/1.cc: Same.
+       * testsuite/27_io/basic_stringstream/2.cc: Same.
+       * testsuite/27_io/basic_stringbuf/4.cc: Same.
+       * testsuite/27_io/basic_stringbuf/1.cc: Same.
+       * testsuite/27_io/basic_stringbuf/2.cc: Same.
+       * testsuite/27_io/basic_streambuf/2.cc: Same.
+       * testsuite/27_io/basic_ostringstream/2.cc: Same.
+       * testsuite/27_io/basic_ostream/2.cc: Same.
+       * testsuite/27_io/basic_ofstream/2.cc: Same.
+       * testsuite/27_io/basic_istringstream/2.cc: Same.
+       * testsuite/27_io/basic_istream/2.cc: Same.
+       * testsuite/27_io/basic_iostream/2.cc: Same.
+       * testsuite/27_io/basic_ios/2.cc: Same.
+       * testsuite/27_io/basic_ifstream/2.cc: Same.
+       * testsuite/27_io/basic_fstream/2.cc: Same.
+       * testsuite/ext/stdio_filebuf/char/1.cc: Same, in namespace __gnu_cxx.
+
+       * testsuite/21_strings/basic_string/capacity/1.cc: Don't compare
+       unsigned against zero.
+       * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Same.
+       * testsuite/21_strings/basic_string/capacity/char/1.cc: Same.
+
+       * testsuite/18_support/new_delete_placement.cc: Initialize
+       variables before first use.
+       * testsuite/21_strings/char_traits/requirements/wchar_t/1.cc: Same.
+       * testsuite/21_strings/char_traits/requirements/char/1.cc: Same.
+       * testsuite/21_strings/char_traits/requirements/short/1.cc: Same.
+       * testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc: 
+       Same.
+       * testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_badbit_throw.cc: Same.
+       * testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc: 
+       Same.
+       * testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_failbit_throw.cc: Same.
+       * testsuite/27_io/types/2.cc: Same.
+
+       * testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: Fix temporary
+       file name.      
+       * testsuite/27_io/fpos/14775.cc: Same.
+       
 2004-04-19  Paolo Carlini  <pcarlini@suse.de>
 
        PR libstdc++/15002 (partial)
index e65f19ca57f7056fbedb72db3da255474e15369a..bf28440bd3b7b04d14186e3b65814f00fea98e73 100644 (file)
@@ -1,6 +1,6 @@
 // 2002-07-24 Benjamin Kosnik
 
-// Copyright (C) 2002 Free Software Foundation
+// Copyright (C) 2002, 2004 Free Software Foundation
 //
 // 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
@@ -28,7 +28,7 @@ void test01()
 {
   void* pc = new char;
   void* pa = new char[10];
-  void* tmp;
+  void* tmp = NULL;
   operator delete(pc, tmp);
   operator delete[](pa, tmp);
 }
index 2599d4298ffbf5d8dda73b96f40293c58c3464d1..f74f143516fd4dac7cbf0e848d2ea5a5ec24c325 100644 (file)
@@ -1,6 +1,6 @@
 // 1999-05-11 bkoz
 
-// Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2002, 2003, 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
@@ -140,7 +140,7 @@ void test01()
   VERIFY( sz04 >= 100 );
   str02.reserve();
   sz03 = str02.capacity();
-  VERIFY( sz03 >= 0 );
+  VERIFY( sz03 == 0 );
 
   sz03 = str02.size() + 5;
   str02.resize(sz03);
index 9cdc4f0457cf63408ced184a8ad757ee11a2bd46..e55899dbbe5bc9a325822cce70bdfeef1c3fc4af 100644 (file)
@@ -1,6 +1,6 @@
 // 1999-05-11 bkoz
 
-// Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2002, 2003, 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
@@ -37,7 +37,7 @@ void test01()
   VERIFY( sz02 >= 100 );
   str01.reserve();
   sz01 = str01.capacity();
-  VERIFY( sz01 >= 0 );
+  VERIFY( sz01 == 0 );
 
   sz01 = str01.size() + 5;
   str01.resize(sz01);
index 925d812c7481fd847cf63171fff2acb405a4a87d..55c134638188cbd831e612606120e0949eb87716 100644 (file)
@@ -1,6 +1,6 @@
 // 1999-05-11 bkoz
 
-// Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2002, 2003, 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
@@ -37,7 +37,7 @@ void test01()
   VERIFY( sz02 >= 100 );
   str01.reserve();
   sz01 = str01.capacity();
-  VERIFY( sz01 >= 0 );
+  VERIFY( sz01 == 0 );
 
   sz01 = str01.size() + 5;
   str01.resize(sz01);
index 4ef29f20d35ba94579d94e0cc29d8435cf493807..15500b0dce2fafe5a9525a87d3b42b8675cc3f96 100644 (file)
@@ -1,6 +1,6 @@
 // 1999-06-03 bkoz
 
-// Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2001, 2003, 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
@@ -56,6 +56,7 @@ void test01(void)
   const char str_lit1[] = "montara and ocean beach";
   int len = sizeof(str_lit1) + sizeof(array1) - 1; // two terminating chars
   char array2[len];
+  std::char_traits<char>::copy(array2, "boracay, philippines", len);
 
   VERIFY( str_lit1[0] == 'm' );
   c1 = array2[0];
index b38b3cff177c8fe3bc3ca117361ecaca8f862e8a..4dbcae0db914176bf39f60180b57ca4ddd85fdfd 100644 (file)
@@ -1,7 +1,7 @@
 // 1999-06-03 bkoz
 // 2003-07-22 Matt Austern
 
-// Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2001, 2003, 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
@@ -76,7 +76,9 @@ void test02(void)
 
   int len = sizeof(str_lit1)/sizeof(short) + sizeof(array1)/sizeof(short) - 1;
   // two terminating chars
+  short array3[] = {'b', 'o', 'r', 'a', 'c', 'a', 'y', ',', ' ', 'p', 'h', 'i', 'l', 'i', 'p', 'p', 'i', 'n', 'e', 's', 0};
   short array2[len];
+  std::char_traits<short>::copy(array2, array3, len);
 
   VERIFY( str_lit1[0] == 'm' );
   c1 = array2[0];
index d4a64ae4a10bbb4bc7946d0a1a690d68a0a7250d..d7582ca4cc107a921c6a2da058f1e0efb0c64078 100644 (file)
@@ -1,6 +1,6 @@
 // 1999-06-03 bkoz
 
-// Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2001, 2003, 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
@@ -56,6 +56,7 @@ void test02(void)
   const wchar_t str_lit1[] = L"montara and ocean beach";
   int len = sizeof(str_lit1) + sizeof(array1) - 1; // two terminating chars
   wchar_t array2[len];
+  std::char_traits<wchar_t>::copy(array2, L"boracay, philippines", len);
 
   VERIFY( str_lit1[0] == 'm' );
   c1 = array2[0];
index 5005c17f4b4519c8c2fdf0653e43bb65ec0b181b..60f00ba41d4e345303c12ff2a4d9e6eb775622f2 100644 (file)
@@ -1,6 +1,6 @@
 // 1999-01-17 bkoz test functionality of basic_filebuf for char_type == char
 
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -30,9 +30,8 @@
 // test05
 // libstdc++/1886
 // should be able to instantiate basic_filebuf for non-standard types.
-namespace test 
+namespace std
 {
-  using namespace std;
   using __gnu_test::pod_char;
   typedef short type_t;
   template class basic_filebuf<type_t, char_traits<type_t> >;
index 497a35fea72f4ba257a98341952106b19646f7f7..a6cb7b12a1d2912772fe0feb1940e544ecd16c8c 100644 (file)
@@ -33,7 +33,7 @@ protected:
 };
 
 // libstdc++/13171
-int test01()
+void test01()
 {
   bool test __attribute__((unused)) = true;
   using namespace std;
@@ -51,4 +51,5 @@ int test01()
 int main()
 {
   test01();
+  return 0;
 }
index afda81412cb296bc6110a5a22d7ac42f57efafa1..3d15b24e2034cee2e6235f4fdcccf18c9067052b 100644 (file)
@@ -25,7 +25,7 @@
 #include <testsuite_hooks.h>
 
 // libstdc++/13582
-int test01()
+void test01()
 {
   bool test __attribute__((unused)) = true;
   using namespace std;
index 861a6044f9e3a14c8ec9ac4ab368f909d2921623..ebe1941736690e76c68587663d474a66978824c1 100644 (file)
@@ -1,6 +1,6 @@
 // 2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
 
-// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003, 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
@@ -35,9 +35,8 @@
 
 // { dg-do compile }
 
-namespace test 
+namespace std
 {
-  using namespace std;
   using __gnu_test::pod_char;
   typedef short type_t;
   template class basic_fstream<type_t, char_traits<type_t> >;
index 6fb71a575ad18379daa236824f95aab1c28d59dc..224abcf6608165949e51e9c9003a3f78ad42f9a1 100644 (file)
@@ -1,6 +1,6 @@
 // 2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
 
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 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
@@ -34,9 +34,8 @@
 
 // { dg-do compile }
 
-namespace test 
+namespace std
 {
-  using namespace std;
   typedef short type_t;
   template class basic_ifstream<type_t, char_traits<type_t> >;
 } // test
index 56e2bd8ed692d193f1facc51780f14d888cb4501..88b94438642fc24e351174f9697480deac200f20 100644 (file)
@@ -1,6 +1,6 @@
 // 2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
 
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 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
@@ -34,9 +34,8 @@
 
 // { dg-do compile }
 
-namespace test 
+namespace std
 {
-  using namespace std;
   typedef short type_t;
   template class basic_ios<type_t, char_traits<type_t> >;
 } // test
index b77ec4f79f24f9de671a4053719f1316a3305a9f..eff577092858e2266fc32172911bf9a1a136bfc8 100644 (file)
@@ -1,6 +1,6 @@
 // 2002-01-08 bkoz
 
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 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
@@ -34,9 +34,8 @@
 
 #include <istream>
 
-namespace test 
+namespace std
 {
-  using namespace std;
   typedef short type_t;
   template class basic_iostream<type_t, char_traits<type_t> >;
 } // test
index 7676f6a094e76e928a295578b381c25a035429e4..b58b77ce5bf65d26c957f70f07a40c632479859e 100644 (file)
@@ -1,6 +1,7 @@
 // 1999-09-20 bkoz
 
-// Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 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
@@ -35,9 +36,8 @@
 
 // { dg-do compile }
 
-namespace test 
+namespace std
 {
-  using namespace std;
   using __gnu_test::pod_char;
   typedef short type_t;
   template class basic_istream<type_t, char_traits<type_t> >;
index 435e7f428af76ed5c6f04d2c940b35589edf6b8d..0e27199fd2b2aa3802868ed932d3843a72db5717 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2003 Free Software Foundation, Inc.
+// Copyright (C) 2003, 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
@@ -54,7 +54,8 @@ void testthrow(T arg)
       }
   catch(...) 
     {
-      VERIFY( test = false );
+      test = false;
+      VERIFY( test );
     }    
 }
 
index bf893408064de7006c7dcd2e49ac655023dfe6c2..2d65f2c81a1438056628a9793a12fabdbc09376f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2003 Free Software Foundation, Inc.
+// Copyright (C) 2003, 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
@@ -67,7 +67,7 @@ void test02()
   istream stream(&bib);
   stream.exceptions(ios_base::badbit);
 
-  istream::off_type off;
+  istream::off_type off(5);
 
   try
     {
index becb4c8a81f2d00d78c11c775603ba5fc5f8dcd5..27e6f565916ab6f76245f093a442eccaf8a62884 100644 (file)
@@ -1,6 +1,6 @@
 // 2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
 
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 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
@@ -34,9 +34,8 @@
 
 // { dg-do compile }
 
-namespace test 
+namespace std
 {
-  using namespace std;
   typedef short type_t;
   template class basic_istringstream<type_t, char_traits<type_t> >;
 } // test
index 509386e2a11ad589195883ee0c1e358fde302ded..d9cd676704b43a59b84d545389b672e372be258f 100644 (file)
@@ -1,6 +1,6 @@
 // 2000-01-10 bkoz
 
-// Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2003, 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
@@ -48,7 +48,7 @@ void test01()
   state1 = is01.rdstate();
   is01 >> a;
   state2 = is01.rdstate();
-  VERIFY( a = i01 );
+  VERIFY( a == i01 );
   // 22.2.2.1.2 num_get virtual functions
   // p 13
   // in any case, if stage 2 processing was terminated by the test for
index b13948945a6ee935e342d0f1edce785b7728b50f..24f2ed4822edc33f3dd4e72811455617094955e3 100644 (file)
@@ -1,6 +1,6 @@
 // 2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
 
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 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
@@ -34,9 +34,8 @@
 
 // { dg-do compile }
 
-namespace test 
+namespace std
 {
-  using namespace std;
   typedef short type_t;
   template class basic_ifstream<type_t, char_traits<type_t> >;
 } // test
index 3910aa7bd349ad50d2046079db12c0f5031c495f..84305c8bdc0a094d8bb8c9fa21c990277b817500 100644 (file)
@@ -1,6 +1,7 @@
 // 1999-09-20 bkoz
 
-// Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 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
@@ -35,9 +36,8 @@
 
 // { dg-do compile }
 
-namespace test 
+namespace std
 {
-  using namespace std;
   using __gnu_test::pod_char;
   typedef short type_t;
   template class basic_ostream<type_t, char_traits<type_t> >;
index a084dbdb7d496a801c52b62718494ded07fb1f00..32ff029b6a00698d4f4bac04df68b47d1d9a44e4 100644 (file)
@@ -1,6 +1,6 @@
 // 2003-03-08  Jerry Quinn  <jlquinn@optonline.net>
 
-// Copyright (C) 2003 Free Software Foundation, Inc.
+// Copyright (C) 2003, 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
@@ -39,7 +39,7 @@ void test_badbit()
 
   try 
     {
-      T i;
+      T i = T();
       stream << i;
       VERIFY( false );
     }
index a1fbe21178f94e415415093d0850eada48c14e5a..6b3b77df68c576fb4198fc660b0e9887dac75c87 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2003
+// Copyright (C) 2003, 2004
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -45,7 +45,7 @@ void test_failbit()
   
   try
     {
-      T i;
+      T i = T();
       stream << i;
     }
   catch (const ios_base::failure&)
index b0b30518eb0ac06fc3c8a7b5b61b12bd036c8b8b..eba317456c787097d79c594a998ae9be038d7e9a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2003 Free Software Foundation, Inc.
+// Copyright (C) 2003, 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
@@ -40,7 +40,7 @@ void test01()
   ostream stream(&bib);
   stream.exceptions(ios_base::badbit);
 
-  ostream::pos_type pos;
+  ostream::pos_type pos = ostream::pos_type();
 
   try
     {
@@ -67,7 +67,7 @@ void test02()
   ostream stream(&bib);
   stream.exceptions(ios_base::badbit);
 
-  ostream::off_type off;
+  ostream::off_type off(5);
 
   try
     {
index a1ca0bf27ed303dc6ac2e27e949d2af97cab0868..dd0d4c40206587b517890c512dbc9b1ec361a668 100644 (file)
@@ -1,6 +1,6 @@
 // 2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
 
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 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
@@ -34,9 +34,8 @@
 
 // { dg-do compile }
 
-namespace test 
+namespace std
 {
-  using namespace std;
   typedef short type_t;
   template class basic_ostringstream<type_t, char_traits<type_t> >;
 } // test
index 71da9a593494e1f9b02bb64fe3edb5a18a4203d9..83d510d85f7a00e19b09449a1034306bd7c8051e 100644 (file)
@@ -1,6 +1,6 @@
 // 2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
 
-// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003, 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
@@ -35,9 +35,8 @@
 
 // { dg-do compile }
 
-namespace test 
+namespace std
 {
-  using namespace std;
   using __gnu_test::pod_char;
   typedef short type_t;
   template class basic_streambuf<type_t, char_traits<type_t> >;
index 7841f3275c548a80e958570a7a973d7d6c7a571a..b80f50a939fedfdb49cc2aaf8ccdfd1522c8acef 100644 (file)
@@ -47,15 +47,6 @@ void test01()
   typedef test_type::off_type off_type;
 }
 
-namespace test 
-{
-  using namespace std;
-  using __gnu_test::pod_char;
-  typedef short type_t;
-  template class basic_stringbuf<type_t, char_traits<type_t> >;
-  template class basic_stringbuf<pod_char, char_traits<pod_char> >;
-} // test
-
 int main() 
 {
   test01();
index 940aa7a852ae0c11634da9bf00a85287bc321688..b4532bf9e183707e3c6f3dbc090efa871006a268 100644 (file)
@@ -1,6 +1,6 @@
 // 1999-01-17 bkoz test functionality of basic_filebuf for char_type == char
 
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // test05
 // libstdc++/1886
 // should be able to instantiate basic_stringbuf for non-standard types.
-namespace test 
+namespace std
 {
-  using namespace std;
   using __gnu_test::pod_char;
   typedef short type_t;
   template class basic_stringbuf<type_t, char_traits<type_t> >;
   template class basic_stringbuf<pod_char, char_traits<pod_char> >;
-} // test
+} // std
 
 // more surf!!!
 
index fd2ddbd6accce2cead50a97f04f790ef2e4e6b45..eebc9968bb29cc41520352c38e0eb7055bfa7353 100644 (file)
@@ -1,6 +1,6 @@
 // 2003-04-07 bkoz
 
-// Copyright (C) 2003 Free Software Foundation, Inc.
+// Copyright (C) 2003, 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
@@ -27,9 +27,8 @@
 
 // { dg-do compile }
 
-namespace test 
+namespace std
 {
-  using namespace std;
   using __gnu_test::pod_char;
   typedef __gnu_test::tracker_alloc<char> alloc_type;
   template class basic_stringbuf<char, char_traits<char>, alloc_type>;
index 5cd55f1d30b0a7792f3e36516dd2de00e0c07070..fcec7f75238adfb50072d8eadb5f2f11951a9dfa 100644 (file)
@@ -1,6 +1,6 @@
 // 2002-07-25 Benjamin Kosnik <bkoz@redhat.com>
 
-// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003, 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
 
 // { dg-do compile }
 
-namespace test 
+namespace std
 {
-  using namespace std;
   using __gnu_test::pod_char;
   typedef short type_t;
   template class basic_stringstream<type_t, char_traits<type_t> >;
   template class basic_stringstream<pod_char, char_traits<pod_char> >;
-} // test
+} // std
index 45c78cdafacc3cd7636c4d52ed017f1e2fba42d1..00bfb89c85fafda18b81cec9cc8e9f28220b4341 100644 (file)
@@ -1,6 +1,6 @@
 // 2001-05-24 Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 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
@@ -48,7 +48,7 @@ void test01()
   state1 = is01.rdstate();
   is01 >> a;
   state2 = is01.rdstate();
-  VERIFY( a = i01 );
+  VERIFY( a == i01 );
   // 22.2.2.1.2 num_get virtual functions
   // p 13
   // in any case, if stage 2 processing was terminated by the test for
index 8d927dc51e128fb029414a4afb79c23105cfc97f..4d9fe8629f3ec4cdda1efb78460761596435ceb5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2003
+// Copyright (C) 2003, 2004
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 
 // { dg-do compile }
 
-namespace test 
+namespace std
 {
-  using namespace std;
   using __gnu_test::pod_char;
   typedef short type_t;
   template class fpos<type_t>;
   template class fpos<pod_char>;
-} // test
+} // std
 
 // more surf!!!
 
index 19c839e2f7447e04ec1c5226f92304574ba406ac..0e83c05b9ca81572c3942f6c2e2199f8d005f6fe 100644 (file)
@@ -24,7 +24,7 @@
 #include <testsuite_hooks.h>
 
 // libstdc++/14320
-int test01()
+void test01()
 {
   using namespace std;
   bool test __attribute__((unused)) = true;
index aff56b6fefb03703d63c0a0ec29bc05e3389a201..c8d5b9d6e7457e6af8df9419b05376d3698081e2 100644 (file)
@@ -38,7 +38,7 @@ void test01()
   __gnu_test::set_file_limit(TWO_GB + 200);
 
   basic_filebuf<char> fb;
-  fb.open("14775_tmp", ios_base::out | ios_base::in | ios_base::trunc);
+  fb.open("tmp_14775", ios_base::out | ios_base::in | ios_base::trunc);
 
   pos_type ret = fb.pubseekoff(TWO_GB + 100, ios_base::beg);
   VERIFY( ret != pos_type(off_type(-1)) );
index 0da1382edd57d23ce60e29e8c86330c921a85646..a5570903ed9635d8d7967db9a1fc27ac3e30f3fe 100644 (file)
@@ -58,7 +58,8 @@ void test02()
     }
   catch(...)
     {
-      VERIFY( test = false );
+      test = false;
+      VERIFY( test );
     }
   VERIFY( v == 0 );
 
@@ -77,7 +78,8 @@ void test02()
     }
   catch(...)
     {
-      VERIFY( test = false );
+      test = false;
+      VERIFY( test );
     }
   VERIFY( v == &test );
 
@@ -96,7 +98,8 @@ void test02()
     }
   catch(...)
     {
-      VERIFY( test = false );
+      test = false;
+      VERIFY( test );
     }
   VERIFY( l == 0 );
 
@@ -115,7 +118,8 @@ void test02()
     }
   catch(...)
     {
-      VERIFY( test = false );
+      test = false;
+      VERIFY( test );
     }
   VERIFY( l == 1 );
 
index 6e0cb502220b17134b969113d6f5e9e6485f3d5f..106c8f1e9d008a50508f3ee062fce58bce88661b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2003 Free Software Foundation
+// Copyright (C) 2003, 2004 Free Software Foundation
 //
 // 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
@@ -23,7 +23,7 @@
 
 void test01()
 {
-  std::streamsize ssize; 
+  std::streamsize ssize = 0
   std::streamoff soff;
 
   // No signed/unsigned warnings.
index 8b313b3f31f380e042256bf9c82b7fde11b40e2c..ab28f369eddeb0892ca0fac4e1126e99c49a3f98 100644 (file)
@@ -1,6 +1,6 @@
 // 2003-02-11  Paolo Carlini  <pcarlini@unitus.it>
 
-// Copyright (C) 2003 Free Software Foundation, Inc.
+// Copyright (C) 2003, 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
 // { dg-do compile }
 
 // libstdc++/9320
-namespace test 
+namespace __gnu_cxx
 {
-  using namespace std;
-  using __gnu_test::pod_char;
   typedef short type_t;
-  template class __gnu_cxx::stdio_filebuf<type_t, char_traits<type_t> >;
-  template class __gnu_cxx::stdio_filebuf<pod_char, char_traits<pod_char> >;
-} // test
+  template class stdio_filebuf<type_t, std::char_traits<type_t> >;
+  template class stdio_filebuf<__gnu_test::pod_char, std::char_traits<__gnu_test::pod_char> >;
+} // __gnu_cxx
index 9ba9eb5043eefcadbb8d1219b03a29d3fa6c873d..158287faaa84f54b6a91360d761627a81c74e1f6 100644 (file)
@@ -26,7 +26,7 @@ void test01()
   using namespace std;
   bool test __attribute__((unused)) = true;
 
-  const char* name = "12077_tmp";
+  const char* name = "tmp_12077";
 
   locale loc = __gnu_test::try_named_locale("is_IS.UTF-8");
   locale::global(loc);