
6 Mar
2012
6 Mar
'12
9:13 p.m.
On Tue, Mar 6, 2012 at 8:53 PM, svarneticist
I found it helpful to include this in my test cases:
#include "boost/test/unit_test_monitor.hpp" #include "boost/exception/all.hpp"
void translate(boost::exception const& e) { BOOST_FAIL(boost::diagnostic_information(e)); }
struct Exception_fixture { Exception_fixture() {
::boost::unit_test::unit_test_monitor.register_exception_translatorboost::exception(&translate); } };
BOOST_GLOBAL_FIXTURE( Exception_fixture );
BOOST_AUTO_TEST_CASE( case01 ) { //test body }
Wow! This is a really great tip! Thanks a lot!