开发者

Boost Unit Test Framework: How to show a per test suite message

开发者 https://www.devze.com 2023-02-02 22:28 出处:网络
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, e

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
0

精彩评论

暂无评论...
验证码 换一张
取 消