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
This commit is contained in:
Paolo Carlini 2005-11-10 15:13:15 +00:00 committed by Paolo Carlini
parent 6d3e3e6aa9
commit c579887923
4 changed files with 45 additions and 33 deletions

View File

@ -1,3 +1,12 @@
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> 2005-11-10 Paolo Carlini <pcarlini@suse.de>
* include/tr1/boost_shared_ptr.h (_Sp_counted_base::release, * include/tr1/boost_shared_ptr.h (_Sp_counted_base::release,

View File

@ -1,4 +1,3 @@
// { dg-do run { xfail *-*-* } }
// Copyright (C) 2005 Free Software Foundation // Copyright (C) 2005 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
@ -34,18 +33,20 @@ test01()
X x; X x;
try 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&) catch (const std::tr1::bad_weak_ptr&)
{ {
// Expected. // Expected.
__throw_exception_again; VERIFY( true );
} }
catch (...) catch (...)
{ {
// Failed. // Failed.
} VERIFY( false );
}
return 0; return 0;
} }

View File

@ -1,4 +1,3 @@
// { dg-do run { xfail *-*-* } }
// Copyright (C) 2005 Free Software Foundation // Copyright (C) 2005 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 X x(*p); // copy of shared object should not be shared
try 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&) catch (const std::tr1::bad_weak_ptr&)
{ {
// Expected. // Expected.
__throw_exception_again; VERIFY( true );
} }
catch (...) catch (...)
{ {
// Failed. // Failed.
} VERIFY( false );
}
return 0; return 0;
} }

View File

@ -1,4 +1,3 @@
// { dg-do run { xfail *-*-* } }
// Copyright (C) 2005 Free Software Foundation // Copyright (C) 2005 Free Software Foundation
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 x = *p; // copy of shared object should not be shared
try 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&) catch (const std::tr1::bad_weak_ptr&)
{ {
// Expected. // Expected.
__throw_exception_again; VERIFY( true );
} }
catch (...) catch (...)
{ {
// Failed. // Failed.
} VERIFY( false );
}
return 0; return 0;
} }