I use GoogleTest extensively and the output in the cosole looks like this:
When I run the same from within Eclipse (using Eclipse Mars latest as of today) I get the following output with no colors and junk characters (are not visible just pasting the output here):
Running main() from gtest_main.cc
[0;32m[==========] [mRunning 3 tests from 1 test case.
[0;32m[----------] [mGlobal test environment set-up.
[0;32m[----------] [m3 tests from NloptAdapterSuite
[0;32m[ RUN ] [mNloptAdapterSuite.testQuadraticFunction1
[0;32m[ OK ] [mNloptAdapterSuite.testQuadraticFunction1 (1 ms)
[0;32m[ RUN ] [mNloptAdapterSuite.testQuadraticFunction1WithNoise
[0;32m[ OK ] [mNloptAdapterSuite.testQuadraticFunction1WithNoise (1 ms)
[0;32m[ RUN ] [mNloptAdapterSuite.testQuadraticFunction2
[0;32m[ OK ] [mNloptAdapterSuite.testQuadraticFunction2 (1 ms)
[0;32m[----------] [m3 tests from NloptAdapterSuite (3 ms total)
[0;32m[----------] [mGlobal test environment tear-down
[0;32m[==========] [m3 tests from 1 test case ran. (3 ms total)
[0;32m[ PASSED ] [m3 tests.
How can this be fixed to have the same output?
The ANSI Escape in Console plugin that greg-449 linked above worked great for me. After installing it, the gtest output looks like:
I'm on Neon.2 (Eclipse 4.6.2).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With