I use Google C++ Testing Framework for unit testing of my code. I use Eclipse CDT with C++ Unit testing module for output analysis.
Previously I used CppUnit it ha
There is a quite simple and hacky way for doing it (without need of diving into internal classes or creating new custom classes).
Just define a macro:
#define GTEST_COUT std::cerr << "[ ] [ INFO ]"
and use GTEST_COUT
(just like cout
) in your tests :
GTEST_COUT << "Hello World" << std::endl;
And you'll see such result:
Credit goes to @Martin Nowak for his finding.