
Olaf Meeuwissen
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. 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. HTH, Gennadiy