Boost logo

Boost :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2008-01-24 05:32:54


Hi Gennadiy,

I often want to output message or do additional test of another test fails.

It would be cool if I could do it like this:

if( !BOOST_CHECK_CLOSE( aStarEcr, close, 0.0001 ) )
{
      BOOST_MESSAGE( "\nA* sequence: " << aStarSeq );
      BOOST_MESSAGE( "\nClose sequence: " << closeSeq );
}

But, AFAICT, the macros are implemented this way:

#define BOOST_CHECK_WITH_ARGS_IMPL( P, check_descr, TL, CT, ARGS ) \
do { \
     BOOST_TEST_PASSPOINT(); \
     BOOST_TEST_TOOL_IMPL( check_frwd, P, check_descr, TL, CT ) \
     BOOST_PP_SEQ_FOR_EACH( BOOST_TEST_PASS_ARG_INFO, '_', ARGS ) ); \
} while( ::boost::test_tools::dummy_cond ) \
/**/

Do you think it would be possible have a bool returning function
instead of the while loop?

best regards

-Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk