diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-10 15:13:15 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-10 15:13:15 +0000 |
commit | e40c9340ce7704c463628fa9cfd35ba0ccff4ce4 (patch) | |
tree | 849dcea525fd88c16a28a7def7c3ad639f7303ef /libstdc++-v3 | |
parent | d77500a30b39279f61d82ce1dca48969dd10f369 (diff) | |
download | gcc-e40c9340ce7704c463628fa9cfd35ba0ccff4ce4.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106736 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
4 files changed, 45 insertions, 33 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 0ca7b0cfa49..1e03518357e 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 ca163435bdd..c7a9dbf722c 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 f4521099b63..9f5f88eea0a 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 93881770bcf..14b203b9fd0 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; } |