Boost logo

Boost Users :

From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2008-05-05 17:37:12


Ovanes Markarian wrote:
> Since our executables (total sum) are pretty big (around 2 gigs) we do
> not want the unit test code to be compiled into the production code,
> since it can easily increase the size. So my question was of the nature:
> Can I somehow without writing own macros, use the Test Framework macros,
> which will remove the entire test code from compilation unit or do I
> have to enable / disable it via an own macro definitions a la:
>
> #if defined PP_WITH_UNIT_TESTS
> BOOST_AUTO_TEST_CASE(some_test) ...
> #endif

The answer is no. You will have to use your own macro. I can't imagine
why would u want Boost.Test support for that.

> And the other question is: can I make hierarchical test dependencies
> with BOOST_AUTO_TEST_CASE. The problem is, it is not always a good idea
> run all unit tests, because of timing aspects.

Not sure what you mean exactly. But with 1.35 you can:

1. Define multilevel hierarchies of test suites and test cases
2. Add dependency of one test unit to any other test unit in a test tree
3. run any set of test units selected by their name, including single
test case, single test suite.

Gennadiy


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net