How do I set up the Eclipse console to have the same GoogleTests result as the terminal?

I am using GoogleTest and the output in the constellation looks like this:

GoogleTest console output

When I run the same from Eclipse (using the latest Eclipse Mars to date), I get the following output without colors and unwanted characters (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 result?

+3


source to share


1 answer


The ANSI Escape in Console plugin that greg-449 link above works fine for me. After installing it, the fastest output looks like this:

gtest console output



I'm on Neon.2 (Eclipse 4.6.2).

+2


source







All Articles