This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] Enable 3 tr1::enable_shared_from_this tests


Hi,

tested x86-linux, committed.

Paolo.

/////////////////
2005-11-10  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/tr1/2_general_utilities/memory/
	enable_shared_from_this/not_shared.cc: Adjust, remove xfail.
	* testsuite/tr1/2_general_utilities/memory/
	enable_shared_from_this/not_shared2.cc: Likewise.
	* testsuite/tr1/2_general_utilities/memory/
	enable_shared_from_this/not_shared3.cc: Likewise.
Index: testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared.cc
===================================================================
--- testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared.cc	(revision 106728)
+++ testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared.cc	(working copy)
@@ -1,4 +1,3 @@
-// { dg-do run { xfail *-*-* } }
 // Copyright (C) 2005 Free Software Foundation
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -34,18 +33,20 @@
   X x;
 
   try
-  {
-    std::tr1::shared_ptr<X> p = x.shared_from_this();
-  }
+    {
+      std::tr1::shared_ptr<X> p = x.shared_from_this();
+      VERIFY( false );
+    }
   catch (const std::tr1::bad_weak_ptr&)
-  {
-    // Expected.
-    __throw_exception_again;
-  }
+    {
+      // Expected.
+      VERIFY( true );
+    }
   catch (...)
-  {
-    // Failed.
-  }
+    {
+      // Failed.
+      VERIFY( false );
+    }
 
   return 0;
 }
Index: testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared2.cc
===================================================================
--- testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared2.cc	(revision 106728)
+++ testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared2.cc	(working copy)
@@ -1,4 +1,3 @@
-// { dg-do run { xfail *-*-* } }
 // Copyright (C) 2005 Free Software Foundation
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -36,18 +35,20 @@
   X x(*p);  // copy of shared object should not be shared
 
   try
-  {
-    std::tr1::shared_ptr<X> p = x.shared_from_this();
-  }
+    {
+      std::tr1::shared_ptr<X> p = x.shared_from_this();
+      VERIFY( false );
+    }
   catch (const std::tr1::bad_weak_ptr&)
-  {
-    // Expected.
-    __throw_exception_again;
-  }
+    {
+      // Expected.
+      VERIFY( true );
+    }
   catch (...)
-  {
-    // Failed.
-  }
+    {
+      // Failed.
+      VERIFY( false );
+    }
 
   return 0;
 }
Index: testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared3.cc
===================================================================
--- testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared3.cc	(revision 106728)
+++ testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared3.cc	(working copy)
@@ -1,4 +1,3 @@
-// { dg-do run { xfail *-*-* } }
 // Copyright (C) 2005 Free Software Foundation
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -37,18 +36,20 @@
   x = *p;  // copy of shared object should not be shared
 
   try
-  {
-    std::tr1::shared_ptr<X> p = x.shared_from_this();
-  }
+    {
+      std::tr1::shared_ptr<X> p = x.shared_from_this();
+      VERIFY( false );
+    }
   catch (const std::tr1::bad_weak_ptr&)
-  {
-    // Expected.
-    __throw_exception_again;
-  }
+    {
+      // Expected.
+      VERIFY( true );
+    }
   catch (...)
-  {
-    // Failed.
-  }
+    {
+      // Failed.
+      VERIFY( false );
+    }
 
   return 0;
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]