10132-1.cc: Explicitly qualify exceptions.
authorBrad Spencer <spencer@infointeractive.com>
Fri, 26 Sep 2003 20:20:55 +0000 (20:20 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Fri, 26 Sep 2003 20:20:55 +0000 (20:20 +0000)
2003-09-26  Brad Spencer  <spencer@infointeractive.com>

* testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc:
Explicitly qualify exceptions.
* testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc: Same.
* testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc: Same.
* testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc: Same.
* testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc: Same.

From-SVN: r71832

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc
libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc
libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc
libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc
libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc

index 7729b7bbd6b16d439f1e40a462f1837acf4a5fc2..38a115dd00d554ad31163cc09e8ae14023cbb6ff 100644 (file)
@@ -1,3 +1,12 @@
+2003-09-26  Brad Spencer  <spencer@infointeractive.com>
+
+       * testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc:
+       Explicitly qualify exceptions.
+       * testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc: Same.
+       * testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc: Same.
+       * testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc: Same.
+       * testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc: Same.
+       
 2003-09-25  Paolo Carlini  <pcarlini@unitus.it>
 
        PR libstdc++/12352
index 04f4b44358e6dc26673631e30985d972d46a4d35..503073ea9005038b76d7e1691f29ef2f8f75bb9f 100644 (file)
@@ -33,20 +33,19 @@ protected:
 
 int main()
 {
-  using namespace std;
   bool test __attribute__((unused)) = true;
 
-  locale loc = locale(locale::classic(), new Cvt);
-  wfilebuf* fb = new wfilebuf;
+  std::locale loc = std::locale(std::locale::classic(), new Cvt);
+  std::wfilebuf* fb = new std::wfilebuf;
   fb->pubimbue(loc);
-  fb->open("tmp_10132", ios_base::out);
+  fb->open("tmp_10132", std::ios_base::out);
   fb->sputc(L'a');
   
   try
     {
       delete fb;
     }
-  catch(exception& obj)
+  catch(std::exception& obj)
     {
       VERIFY( false ); 
     }
index e9e302bf7ee6e7228517109ca0c299af8b2cf81f..d285bc11367105e4297cecd7141895354faa9e6f 100644 (file)
@@ -124,49 +124,47 @@ namespace std
 // Sentry uses locale info, so have to try one formatted input/output.
 void test03()
 {
-  using namespace std;
   bool test __attribute__((unused)) = true;
 
   // input streams
-  basic_ifstream<unsigned char> ifs_uc;
+  std::basic_ifstream<unsigned char> ifs_uc;
   unsigned char arr[6] = { 'a', 'b', 'c', 'd', 'e' };
-
   try 
     { 
       int i;
       ifs_uc >> i;
     }
-  catch (bad_cast& obj)
+  catch (std::bad_cast& obj)
     { }
-  catch (exception& obj)
+  catch (std::exception& obj)
     { test = false; }
   
   try 
     { 
       ifs_uc >> arr;
     }
-  catch (bad_cast& obj)
+  catch (std::bad_cast& obj)
     { }
-  catch (exception& obj)
+  catch (std::exception& obj)
     { test = false; }
   
   try 
     { 
-      ifs_uc >> ws;
+      ifs_uc >> std::ws;
     }
-  catch (bad_cast& obj)
+  catch (std::bad_cast& obj)
     { }
-  catch (exception& obj)
+  catch (std::exception& obj)
     { test = false; }
  
   try 
     { 
-      basic_string<unsigned char> s_uc(arr);
+      std::basic_string<unsigned char> s_uc(arr);
       ifs_uc >> s_uc;
     }
-  catch (bad_cast& obj)
+  catch (std::bad_cast& obj)
     { }
-  catch (exception& obj)
+  catch (std::exception& obj)
     { test = false; }
    
   VERIFY( test );
index 77bf598ec89fa00662fbc2a24d82323045b5c2ef..0ae9c80777051bb057e373b598b2422d0fb29ab5 100644 (file)
@@ -124,11 +124,10 @@ namespace std
 // Sentry uses locale info, so have to try one formatted input/output.
 void test03()
 {
-  using namespace std;
   bool test __attribute__((unused)) = true;
 
   // input streams
-  basic_istringstream<unsigned char> iss_uc;
+  std::basic_istringstream<unsigned char> iss_uc;
   unsigned char arr[6] = { 'a', 'b', 'c', 'd', 'e' };
 
   try 
@@ -136,37 +135,37 @@ void test03()
       int i;
       iss_uc >> i;
     }
-  catch (bad_cast& obj)
+  catch (std::bad_cast& obj)
     { }
-  catch (exception& obj)
+  catch (std::exception& obj)
     { test = false; }
   
   try 
     { 
       iss_uc >> arr;
     }
-  catch (bad_cast& obj)
+  catch (std::bad_cast& obj)
     { }
-  catch (exception& obj)
+  catch (std::exception& obj)
     { test = false; }
   
   try 
     { 
-      iss_uc >> ws;
+      iss_uc >> std::ws;
     }
-  catch (bad_cast& obj)
+  catch (std::bad_cast& obj)
     { }
-  catch (exception& obj)
+  catch (std::exception& obj)
     { test = false; }
  
   try 
     { 
-      basic_string<unsigned char> s_uc(arr);
+      std::basic_string<unsigned char> s_uc(arr);
       iss_uc >> s_uc;
     }
-  catch (bad_cast& obj)
+  catch (std::bad_cast& obj)
     { }
-  catch (exception& obj)
+  catch (std::exception& obj)
     { test = false; }
    
   VERIFY( test );
index e3af42e3b6284080f1fb5099061cb9208ec2bce6..c37c0048449f80ae8faacefbb696806f2b4defb7 100644 (file)
@@ -124,22 +124,19 @@ namespace std
 // Sentry uses locale info, so have to try one formatted input/output.
 void test03()
 {
-  using namespace std;
   bool test __attribute__((unused)) = true;
 
   // output streams
-  basic_ofstream<unsigned char> ofs_uc;
-
+  std::basic_ofstream<unsigned char> ofs_uc;
   try 
     { 
       bool b = true;
       ofs_uc << b;
     }
-  catch (bad_cast& obj)
+  catch (std::bad_cast& obj)
     { }
-  catch (exception& obj)
-    { test = false; }
-   
+  catch (std::exception& obj)
+    { test = false; }   
   VERIFY( test );
 }
 
index fe1a9473c2c36ede078cbd068ac3ae56b2ef061f..5ace23211d16772ef6b6c87063a82cd90790939b 100644 (file)
@@ -124,22 +124,19 @@ namespace std
 // Sentry uses locale info, so have to try one formatted input/output.
 void test03()
 {
-  using namespace std;
   bool test __attribute__((unused)) = true;
 
   // output streams
-  basic_ostringstream<unsigned char> oss_uc;
-
+  std::basic_ostringstream<unsigned char> oss_uc;
   try 
     { 
       bool b = true;
       oss_uc << b;
     }
-  catch (bad_cast& obj)
+  catch (std::bad_cast& obj)
     { }
-  catch (exception& obj)
-    { test = false; }
-   
+  catch (std::exception& obj)
+    { test = false; }   
   VERIFY( test );
 }