forked from boostorg/exception
Merging changes from trunk.
[SVN r58421]
This commit is contained in:
@ -6,6 +6,8 @@
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
class my_exception: public std::exception { };
|
||||
|
||||
int
|
||||
|
@ -45,7 +45,6 @@ compile-fail error_info_const_fail.cpp ;
|
||||
compile exception_ptr_hpp_test.cpp ;
|
||||
compile diagnostic_information_hpp_test.cpp ;
|
||||
compile error_info_hpp_test.cpp ;
|
||||
compile exception_hpp_test.cpp ;
|
||||
compile get_error_info_hpp_test.cpp ;
|
||||
compile info_hpp_test.cpp ;
|
||||
compile info_tuple_hpp_test.cpp ;
|
||||
|
@ -10,10 +10,6 @@
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <string>
|
||||
|
||||
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610))
|
||||
struct my_tag {};
|
||||
#endif
|
||||
|
||||
typedef boost::error_info<struct my_tag,int> my_info;
|
||||
|
||||
template <class T>
|
||||
@ -556,7 +552,7 @@ main()
|
||||
}
|
||||
try
|
||||
{
|
||||
throw boost::enable_current_exception(derives_std_boost_exception("what2") << boost::errinfo_nested_exception(p) );
|
||||
throw boost::enable_current_exception(derives_std_boost_exception("what2") << boost::errinfo_nested_exception(p) );
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
|
@ -43,7 +43,7 @@ main()
|
||||
#else
|
||||
BOOST_THROW_EXCEPTION(e<<errinfo_type_info_name(typeid(int).name()));
|
||||
#endif
|
||||
BOOST_TEST(false);
|
||||
BOOST_ERROR("BOOST_THROW_EXCEPTION failed to throw.");
|
||||
}
|
||||
catch(
|
||||
boost::exception & e )
|
||||
|
@ -9,10 +9,6 @@
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <errno.h>
|
||||
|
||||
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610))
|
||||
struct tag_errno {};
|
||||
#endif
|
||||
|
||||
typedef boost::error_info<struct tag_errno,int> info_errno;
|
||||
|
||||
class
|
||||
@ -28,7 +24,6 @@ main()
|
||||
{
|
||||
errno=1;
|
||||
throw my_exception() << info_errno(errno);
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
catch(
|
||||
my_exception & x )
|
||||
|
@ -35,16 +35,6 @@ user_data
|
||||
}
|
||||
};
|
||||
|
||||
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610))
|
||||
struct tag_test_1 {};
|
||||
struct tag_test_2 {};
|
||||
struct tag_test_3 {};
|
||||
struct tag_test_4 {};
|
||||
struct tag_test_5 {};
|
||||
struct tag_test_6 {};
|
||||
struct tag_user_data {};
|
||||
#endif
|
||||
|
||||
typedef boost::error_info<struct tag_test_1,int> test_1;
|
||||
typedef boost::error_info<struct tag_test_2,unsigned int> test_2;
|
||||
typedef boost::error_info<struct tag_test_3,float> test_3;
|
||||
@ -318,7 +308,6 @@ test_lifetime()
|
||||
try
|
||||
{
|
||||
throw test_exception() << test_7(user_data(count));
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
catch(
|
||||
boost::exception & x )
|
||||
|
@ -9,9 +9,19 @@
|
||||
#include <boost/exception/info.hpp>
|
||||
#include <boost/exception/diagnostic_information.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <stdlib.h>
|
||||
|
||||
struct my_exception: boost::exception, std::exception { };
|
||||
struct
|
||||
my_exception:
|
||||
boost::exception,
|
||||
std::exception
|
||||
{
|
||||
char const *
|
||||
what() const throw()
|
||||
{
|
||||
return "my_exception";
|
||||
}
|
||||
};
|
||||
|
||||
typedef boost::error_info<struct my_tag,int> my_int;
|
||||
|
||||
bool called=false;
|
||||
|
@ -30,7 +30,7 @@ boost_throw_exception_test()
|
||||
try
|
||||
{
|
||||
BOOST_THROW_EXCEPTION(exception1());
|
||||
BOOST_TEST(false);
|
||||
BOOST_ERROR("BOOST_THROW_EXCEPTION failed to throw.");
|
||||
}
|
||||
catch(
|
||||
boost::exception & x )
|
||||
@ -50,7 +50,7 @@ boost_throw_exception_test()
|
||||
try
|
||||
{
|
||||
BOOST_THROW_EXCEPTION(exception2() << test_data(42));
|
||||
BOOST_TEST(false);
|
||||
BOOST_ERROR("BOOST_THROW_EXCEPTION failed to throw.");
|
||||
}
|
||||
catch(
|
||||
boost::exception & x )
|
||||
|
Reference in New Issue
Block a user