mirror of
https://github.com/boostorg/exception.git
synced 2025-07-12 12:06:33 +02:00
Suppressing warnings. Please report any problems (may have broken something!)
[SVN r58072]
This commit is contained in:
@ -9,6 +9,11 @@
|
||||
#include <boost/exception_ptr.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(disable:4702) //unreachable code
|
||||
#endif
|
||||
|
||||
typedef boost::error_info<struct tag_test_int,int> test_data;
|
||||
|
||||
struct
|
||||
@ -30,7 +35,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 )
|
||||
@ -40,7 +45,7 @@ boost_throw_exception_test()
|
||||
int const * line=boost::get_error_info<boost::throw_line>(x);
|
||||
BOOST_TEST( file && *file );
|
||||
BOOST_TEST( function && *function );
|
||||
BOOST_TEST( line && *line==32 );
|
||||
BOOST_TEST( line && *line==37 );
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
@ -50,7 +55,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 )
|
||||
@ -61,7 +66,7 @@ boost_throw_exception_test()
|
||||
int const * data=boost::get_error_info<test_data>(x);
|
||||
BOOST_TEST( file && *file );
|
||||
BOOST_TEST( function && *function );
|
||||
BOOST_TEST( line && *line==52 );
|
||||
BOOST_TEST( line && *line==57 );
|
||||
BOOST_TEST( data && *data==42 );
|
||||
}
|
||||
catch(
|
||||
|
Reference in New Issue
Block a user