forked from boostorg/exception
Committing changes merged from trunk, most notably optional non-intrusive exception_ptr support for MSVC.
[SVN r69620]
This commit is contained in:
@ -146,6 +146,10 @@ test_std_exception()
|
||||
#endif
|
||||
}
|
||||
catch(
|
||||
T & )
|
||||
{
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
@ -176,7 +180,7 @@ test_std_exception_what()
|
||||
catch(
|
||||
T & x )
|
||||
{
|
||||
BOOST_TEST(std::string("what")==x.what());
|
||||
BOOST_TEST(std::string(x.what()).find("what")!=std::string::npos);
|
||||
boost::exception_ptr p = boost::current_exception();
|
||||
BOOST_TEST(!(p==boost::exception_ptr()));
|
||||
BOOST_TEST(p!=boost::exception_ptr());
|
||||
@ -189,7 +193,7 @@ test_std_exception_what()
|
||||
catch(
|
||||
T & x )
|
||||
{
|
||||
BOOST_TEST(std::string("what")==x.what());
|
||||
BOOST_TEST(std::string(x.what()).find("what")!=std::string::npos);
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
@ -216,6 +220,10 @@ test_std_exception_what()
|
||||
#endif
|
||||
}
|
||||
catch(
|
||||
T & )
|
||||
{
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
@ -385,6 +393,11 @@ main()
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
catch(
|
||||
derives_std_exception & )
|
||||
{
|
||||
//Yay! Non-intrusive cloning supported!
|
||||
}
|
||||
catch(
|
||||
boost::unknown_exception & e )
|
||||
{
|
||||
#ifndef BOOST_NO_RTTI
|
||||
@ -434,6 +447,14 @@ 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));
|
||||
@ -495,6 +516,14 @@ 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));
|
||||
|
Reference in New Issue
Block a user