Using the Catch single-include unit-tester, I have (passing) tests like this
TEST_CASE ("sizes", "[metadata]" ) {
INFO ( "The number is " << 42 );
REQUIRE (sizeof(some_struct) == 16);
}
The documentation (linked above) states that the INFO is logged to a buffer, but I haven't figured out how to dump or otherwise retrieve the buffer. The message is not printed to my console, but other things I printf
or shove into cout
and cerror
do print, so my i/o is set up correctly. I tried reading the source to find out where messages are stowed, but it's big and involved. I wonder if someone just happens to know how to retrieve the messages?