I\'m using the googletest C++ testing framework. Normally the textual output of running a test looks like this:
[ RUN ] MyTest.Fuzz
[ OK ] MyTest.Fuzz
I have just used std::cout with ansi color codes in linux but I believe the codes work in windows since win 10 anniversary update.
std::cout << "\033[0;32m" << "[ ] " << "\033[0;0m"
<< "random seed = " << random_seed << std::endl;
or just create a header file and some #define statements and include it in my tests. I also like to format the text to stick out a little more too.
#define ANSI_TXT_GRN "\033[0;32m"
#define ANSI_TXT_MGT "\033[0;35m" //Magenta
#define ANSI_TXT_DFT "\033[0;0m" //Console default
#define GTEST_BOX "[ cout ] "
#define COUT_GTEST ANSI_TXT_GRN << GTEST_BOX //You could add the Default
#define COUT_GTEST_MGT COUT_GTEST << ANSI_TXT_MGT
So my code would be:
std::cout << COUT_GTEST_MGT << "random seed = " << random_seed << ANSI_TXT_DFT << std::endl;