Do you want to check if the function is selected correctly in some circumstances? If so
BOOST_CHECK_THROW( function(), exception_type );
will do it. you can use
BOOST_CHECK_EXCEPTION( function(), exception_type, predicate )
to call an arbitrary predicate to exclude when it is caught, and
BOOST_CHECK_NO_THROW( function() )
so that the function does not throw.
See: http://www.boost.org/doc/libs/1_44_0/libs/test/doc/html/utf/testing-tools/reference.html
source
share