[Please do not mail me a copy of your followup]
boost-users@lists.boost.org spake the secret code
Vicente J. Botet Escriba
writes: Would this works as well? void check_op1() { BOOST_REQUIRE( expr ); } BOOST_AUTO_TEST_CASE( t1 ) { BOOST_TEST_CONTEXT( " Testing invoked from: " << __FILE__ << "(" << __LINE__ << ")" ); check_op1( ); }
Yes. It will, but in my case this statement needs to be written once.
What I'm proposing wouldn't require even this one statement to be written and reuses the existing mechanisms in Boost.Test instead of burdening the author/user of a custom assertion with even more code that they have to write. -- "The Direct3D Graphics Pipeline" free book http://tinyurl.com/d3d-pipeline The Computer Graphics Museum http://computergraphicsmuseum.org The Terminals Wiki http://terminals.classiccmp.org Legalize Adulthood! (my blog) http://legalizeadulthood.wordpress.com