
rozelak@volny.cz wrote:
rozelak@volny.cz wrote:
Is there a way how to achieve what I am looking for?
> Use BOOST_TEST_MESSAGE and set log level to message
Yes, I have read about this option and it works - thank you. I consider
it as not perfect, but working solution.
and used during check failure printing as well (as has been suggested in the example in my first post). I don't know boost source in depth, but it seems
However, I want to ask, if the idea of checkpoints could be generalised that BOOST_TEST_CHECKPOINT
just calls boost::unit_test::unit_test_log.set_checkpoint(...),
> > which stores the checkpoint info in unit_test_log (which is supposed to be singleton). Would, therefore, be possible to print the checkpoint stored also when test failure is printed? May I be helpfull somehow to do this?
Or is it against the idea of the checkpoints?
I think the issue is that BOOST_CHECK and friends set a checkpoint.
I see, you are right. It is set by BOOST_TEST_PASSPOINT() macro. Well, do you think, that it would be beneficial to define new macro, e.g. BOOST_TEST_FAILRECORD (please suggest a better name, if you have one)? The macro would be implemented in the way very similar to BOOST_TEST_CHECKPOINT, but the data "recorded" by the macro would be printed only when a testcase fails or an unexpected exception occurs. It also has the advantage, that when not used, it does not affect the current behaviour of boost. Is there a change to accept it in the boost test framework, if I try to implement it? Thank you for suggestions/comments, Dan