Commit c5798879 by Paolo Carlini Committed by Paolo Carlini

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
parent 6d3e3e6a
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.
......
// { 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;
}
......
// { 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;
}
......
// { 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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment