Boost Unit Test Framework: How to show a per test suite message
Say, I have many test suites attached to the master suite. They run turn by turn. How to print a text message before each suite starts running? If I do it i开发者_JAVA百科n initialization functions, everything is printed at the very beginning, before any suite starts running. If I do it inside a test function, the message may appear multiple times. There should be some macro or something else specifically designed for that purpose.
Change the value of log_level:
- all - report all log messages including the passed test notification
- success - the same as all
- test_suite - show test suite messages
- message - show user messages
- warning -report warnings issued by user
- error - report all error conditions
- cpp_exception - report uncaught c++ exception
- system_error - report system originated non-fatal errors (for example, timeout or floating point exception)
- fatal_error - report only user or system originated fatal errors (for example, memory access violation)
- nothing - do not report any information
精彩评论