id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 5563,using a test macro in a global fixture crashes Boost.Test,m.champlon@…,Raffi Enficiaud,"Using a failing macro (such as BOOST_FAIL) from the constructor (or destructor) of a global fixture crashes the test application, for instance (using vc80 and boost 1.42) : #define BOOST_AUTO_TEST_MAIN #include #define BOOST_LIB_NAME boost_unit_test_framework #include struct fixture { fixture() { BOOST_FAIL( ""oups"" ); } ~fixture() { BOOST_FAIL( ""oups"" ); } }; BOOST_GLOBAL_FIXTURE( fixture ); BOOST_AUTO_TEST_CASE( some_test ) { } The problem lies in compiler_log_formatter.ipp around line 40 : const_string test_phase_identifier() { return framework::is_initialized() ? const_string( framework::current_test_case().p_name.get() ) : BOOST_TEST_L( ""Test setup"" ); } because calling framework::current_test_case() is wrong in this case. Maybe the solution would be to add another state in framework along m_is_initialized and m_test_in_progress ? I would love to provide a patch but I wasn't able to make bjam build and run the tests... Thanks, MAT.",Bugs,closed,Boost 1.65.0,test,Boost 1.42.0,Problem,fixed,,