
Gennadiy Rozental
Olaf Meeuwissen
writes: So what I want to do is report the number of tests that passed all of their BOOST_REQUIRE_* and BOOST_CHECK_* assertions, but failed one or more BOOST_WARN_* assertions.
So anyone have any suggestions?
There is no "legal" way to get what you want in Boost.Test now. I suggest you file a ticket and I'll consider it for next release.
Will do.
Meanwhile, the only component which gets any information about warnings is unit test log. You can "hack" around a bit to get the desired behavior by implementing custom unit_test_log_formatter.
log_entry_start method receives log_entry_type, which will be equal to BOOST_UTL_ET_WARNING in case of warning. You can trap this event (don't forget to forward to the regular formatter after that)
Using framework::current_test_case you can implement your own registry for the warnings information. Combine it with regular Boost.Test output and you'll get what you looking for.
Thanks for the info. I'll have a look later. -- Olaf Meeuwissen, LPIC-2 FLOSS Engineer -- AVASYS CORPORATION FSF Associate Member #1962 Help support software freedom http://www.fsf.org/jf?referrer=1962