From c5798879234295caa4e9ff863697989a663bc864 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Thu, 10 Nov 2005 15:13:15 +0000 Subject: [PATCH] enable_shared_from_this/not_shared.cc: Adjust, remove xfail. 2005-11-10 Paolo Carlini * 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 --- libstdc++-v3/ChangeLog | 9 ++++++++ .../enable_shared_from_this/not_shared.cc | 23 ++++++++++--------- .../enable_shared_from_this/not_shared2.cc | 23 ++++++++++--------- .../enable_shared_from_this/not_shared3.cc | 23 ++++++++++--------- 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,3 +1,12 @@ +2005-11-10 Paolo Carlini + + * 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 * include/tr1/boost_shared_ptr.h (_Sp_counted_base::release, 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 p = x.shared_from_this(); - } + { + std::tr1::shared_ptr 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 p = x.shared_from_this(); - } + { + std::tr1::shared_ptr 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 p = x.shared_from_this(); - } + { + std::tr1::shared_ptr 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; }