我广泛使用GoogleTest,在 cosole 中的输出如下所示:
当我在 Eclipse 中运行相同的程序时(使用今天最新的 Eclipse Mars),我得到以下输出,没有颜色和垃圾字符(仅在此处粘贴输出不可见):
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.
如何将其修复为具有相同的输出?