3

I am working on a set of C++ unit tests in boost::test. After working with the Google test framework, I really appreciate the ability to quickly visually parse colorized output in order to tighten the development cycle. Currently, I'm considering looking into using the gnu source-highlight to create a new language definition, but if there is a way of doing it inside of boost::test, that would be preferable.

Is there a standard way of colorizing boost::test output?

ETA

It looks like the author added support for color:

http://boost.2283326.n4.nabble.com/test-new-feature-colored-output-td2660465.html

However, it is disabled by default. I assume this is managed at compile time. How can this feature be enabled?

ETA2

Another possible option, haven't investigated yet: https://pypi.python.org/pypi/pyrg

Andrew Prock
  • 6,900
  • 6
  • 40
  • 60
  • Not sure if I understand your question correctly, you mean smth like this: http://boost.2283326.n4.nabble.com/test-new-feature-colored-output-td2660465.html ? – Piotr Jaszkowski Jun 05 '13 at 15:11
  • Yes, something like that. That code does not appear to be part of boost 1.53, and isn't documented on the website. – Andrew Prock Jun 05 '13 at 15:29
  • the author of Boost.Test is not the quickest in the world with updating his trunk commits to the released version of the library. There are many more features to come once the overall Boost project completes the transition from Boost.Build to CMake. – TemplateRex Jun 05 '13 at 15:37
  • "...not the quickest..." Given that he added the code 3.5 years ago, how long do you think before it makes it to release? – Andrew Prock Jun 05 '13 at 15:46
  • For merge status see: http://boost.2283326.n4.nabble.com/Boost-Test-updates-in-trunk-need-for-mini-review-tt4637343.html#a4638075 – Andrew Prock Jun 05 '13 at 16:03

1 Answers1

1

The parameters that can be passed to the unit test framework seem to be in this file:

boost\test\impl\unit_test_parameters.ipp

however, I cannot see any *color* related variable in there (boost 1.50 or 1.54). So I guess the feature is still in somewhere in a repository. I join your to say that color output is a nice feature (logs/summaries of GTest are also better).

EDIT: The feature is in trunk:

http://svn.boost.org/svn/boost/trunk/boost/test/impl/unit_test_parameters.ipp
Raffi
  • 3,068
  • 31
  • 33