I'm implementing a custom runner for Google Testing Framework that runs a concrete TestInfo separately and checks its status:
TestInfo* info = ...;
testing::GTEST_FLAG(filter) = std::string(info->test_case_name()) + "." + info->name();
RUN_ALL_TESTS();
std::cout << (info->result()->Passed() ? "Success :)" : "Error :(") << std::endl;
Here testInfo->result() has type TestResult, which has methods that provide information on whether the test has passed or failed, was the failure critical, and also properties which can be set by user.
But google tests can also have a failure message, i. e. FAIL() << "Division by zero";.
Is there any way to retrieve this failure message from the Google Test api?