This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] Enable 3 tr1::enable_shared_from_this tests
- From: Paolo Carlini <pcarlini at suse dot de>
- To: "'gcc-patches at gcc dot gnu dot org'" <gcc-patches at gcc dot gnu dot org>
- Cc: Jonathan Wakely <cow at compsoc dot man dot ac dot uk>
- Date: Thu, 10 Nov 2005 16:15:17 +0100
- Subject: [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;
}