aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2005-11-10 15:13:15 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2005-11-10 15:13:15 +0000
commitc5798879234295caa4e9ff863697989a663bc864 (patch)
tree849dcea525fd88c16a28a7def7c3ad639f7303ef /libstdc++-v3
parent6d3e3e6aa90a6d3d0b2feeed7c107e77246607ed (diff)
downloadgcc-c5798879234295caa4e9ff863697989a663bc864.zip
gcc-c5798879234295caa4e9ff863697989a663bc864.tar.gz
gcc-c5798879234295caa4e9ff863697989a663bc864.tar.bz2
enable_shared_from_this/not_shared.cc: Adjust, remove xfail.
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. From-SVN: r106736
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog9
-rw-r--r--libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared.cc23
-rw-r--r--libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared2.cc23
-rw-r--r--libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared3.cc23
4 files changed, 45 insertions, 33 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 0ca7b0c..1e03518 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,14 @@
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.
+
+2005-11-10 Paolo Carlini <pcarlini@suse.de>
+
* include/tr1/boost_shared_ptr.h (_Sp_counted_base::release,
weak_release): Protect barriers with __GTHREADS.
diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared.cc
index ca16343..c7a9dbf 100644
--- a/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared.cc
+++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared.cc
@@ -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 @@ test01()
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;
}
diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared2.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared2.cc
index f452109..9f5f88e 100644
--- a/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared2.cc
+++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared2.cc
@@ -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 @@ test01()
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;
}
diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared3.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared3.cc
index 9388177..14b203b 100644
--- a/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared3.cc
+++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared3.cc
@@ -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 @@ test01()
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;
}