mirror of
https://github.com/boostorg/exception.git
synced 2026-01-24 16:02:23 +01:00
Revert r69620.
It's breaking the tests and probably isn't appropriate for a bug fix release. [SVN r69816]
This commit is contained in:
@@ -7,13 +7,7 @@
|
||||
|
||||
import testing ;
|
||||
|
||||
project
|
||||
: requirements
|
||||
<link>static
|
||||
<exception-handling>on
|
||||
<source>/boost//exception
|
||||
<define>BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR
|
||||
;
|
||||
project : requirements <exception-handling>on ;
|
||||
|
||||
#to_string
|
||||
|
||||
@@ -43,7 +37,6 @@ run current_exception_cast_test.cpp ;
|
||||
run no_exceptions_test.cpp : : : <exception-handling>off ;
|
||||
run errinfos_test.cpp ;
|
||||
run exception_ptr_test.cpp /boost//thread : : : <threading>multi ;
|
||||
|
||||
compile-fail exception_fail.cpp ;
|
||||
compile-fail throw_exception_fail.cpp ;
|
||||
compile-fail error_info_const_fail.cpp ;
|
||||
|
||||
@@ -146,10 +146,6 @@ test_std_exception()
|
||||
#endif
|
||||
}
|
||||
catch(
|
||||
T & )
|
||||
{
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
@@ -180,7 +176,7 @@ test_std_exception_what()
|
||||
catch(
|
||||
T & x )
|
||||
{
|
||||
BOOST_TEST(std::string(x.what()).find("what")!=std::string::npos);
|
||||
BOOST_TEST(std::string("what")==x.what());
|
||||
boost::exception_ptr p = boost::current_exception();
|
||||
BOOST_TEST(!(p==boost::exception_ptr()));
|
||||
BOOST_TEST(p!=boost::exception_ptr());
|
||||
@@ -193,7 +189,7 @@ test_std_exception_what()
|
||||
catch(
|
||||
T & x )
|
||||
{
|
||||
BOOST_TEST(std::string(x.what()).find("what")!=std::string::npos);
|
||||
BOOST_TEST(std::string("what")==x.what());
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
@@ -220,10 +216,6 @@ test_std_exception_what()
|
||||
#endif
|
||||
}
|
||||
catch(
|
||||
T & )
|
||||
{
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
@@ -393,11 +385,6 @@ main()
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
catch(
|
||||
derives_std_exception & )
|
||||
{
|
||||
//Yay! Non-intrusive cloning supported!
|
||||
}
|
||||
catch(
|
||||
boost::unknown_exception & e )
|
||||
{
|
||||
#ifndef BOOST_NO_RTTI
|
||||
@@ -447,14 +434,6 @@ main()
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
catch(
|
||||
derives_std_boost_exception & x )
|
||||
{
|
||||
//Yay! Non-intrusive cloning supported!
|
||||
BOOST_TEST(boost::get_error_info<my_info>(x));
|
||||
if( int const * p=boost::get_error_info<my_info>(x) )
|
||||
BOOST_TEST(*p==42);
|
||||
}
|
||||
catch(
|
||||
boost::unknown_exception & x )
|
||||
{
|
||||
BOOST_TEST(boost::get_error_info<my_info>(x));
|
||||
@@ -516,14 +495,6 @@ main()
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
catch(
|
||||
derives_boost_exception & x )
|
||||
{
|
||||
//Yay! Non-intrusive cloning supported!
|
||||
BOOST_TEST(boost::get_error_info<my_info>(x));
|
||||
if( int const * p=boost::get_error_info<my_info>(x) )
|
||||
BOOST_TEST(*p==42);
|
||||
}
|
||||
catch(
|
||||
boost::unknown_exception & x )
|
||||
{
|
||||
BOOST_TEST(boost::get_error_info<my_info>(x));
|
||||
|
||||
@@ -6,37 +6,15 @@
|
||||
#include <boost/exception_ptr.hpp>
|
||||
#include <boost/exception/get_error_info.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
#include <boost/detail/atomic_count.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
typedef boost::error_info<struct tag_answer,int> answer;
|
||||
|
||||
boost::detail::atomic_count exc_count(0);
|
||||
|
||||
struct
|
||||
err:
|
||||
virtual boost::exception,
|
||||
virtual std::exception
|
||||
{
|
||||
err()
|
||||
{
|
||||
++exc_count;
|
||||
}
|
||||
|
||||
err( err const & )
|
||||
{
|
||||
++exc_count;
|
||||
}
|
||||
|
||||
virtual
|
||||
~err() throw()
|
||||
{
|
||||
--exc_count;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
err & operator=( err const & );
|
||||
};
|
||||
|
||||
class
|
||||
@@ -138,9 +116,7 @@ simple_test()
|
||||
int
|
||||
main()
|
||||
{
|
||||
BOOST_TEST(++exc_count==1);
|
||||
simple_test();
|
||||
thread_test();
|
||||
BOOST_TEST(!--exc_count);
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
#include <boost/detail/atomic_count.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <iostream>
|
||||
|
||||
@@ -67,34 +66,7 @@ join( thread_handle & t )
|
||||
rethrow_exception(t.err_);
|
||||
}
|
||||
|
||||
boost::detail::atomic_count exc_count(0);
|
||||
|
||||
struct
|
||||
exc:
|
||||
virtual boost::exception,
|
||||
virtual std::exception
|
||||
{
|
||||
exc()
|
||||
{
|
||||
++exc_count;
|
||||
}
|
||||
|
||||
exc( exc const & )
|
||||
{
|
||||
++exc_count;
|
||||
}
|
||||
|
||||
virtual
|
||||
~exc() throw()
|
||||
{
|
||||
--exc_count;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
exc & operator=( exc const & );
|
||||
};
|
||||
|
||||
struct exc: boost::exception, std::exception { };
|
||||
typedef boost::error_info<struct answer_,int> answer;
|
||||
|
||||
void
|
||||
@@ -121,7 +93,6 @@ check( boost::shared_ptr<thread_handle> const & t )
|
||||
int
|
||||
main()
|
||||
{
|
||||
BOOST_TEST(++exc_count==1);
|
||||
try
|
||||
{
|
||||
std::vector< boost::shared_ptr<thread_handle> > threads;
|
||||
@@ -138,5 +109,4 @@ main()
|
||||
boost::current_exception_diagnostic_information() << std::endl;
|
||||
return 42;
|
||||
}
|
||||
BOOST_TEST(!--exc_count);
|
||||
}
|
||||
|
||||
@@ -62,15 +62,6 @@ main()
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
catch(
|
||||
boost::exception & x )
|
||||
{
|
||||
//Yay! Non-intrusive cloning supported!
|
||||
if( int const * d=boost::get_error_info<test>(x) )
|
||||
BOOST_TEST( 42==*d );
|
||||
else
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
@@ -110,11 +101,6 @@ main()
|
||||
{
|
||||
}
|
||||
catch(
|
||||
std::exception & )
|
||||
{
|
||||
//Yay! Non-intrusive cloning supported!
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
@@ -128,11 +114,6 @@ main()
|
||||
{
|
||||
}
|
||||
catch(
|
||||
std::exception & )
|
||||
{
|
||||
//Yay! Non-intrusive cloning supported!
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
|
||||
Reference in New Issue
Block a user