Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.Test]
From: Ruediger Berlich (ruediger.berlich_at_[hidden])
Date: 2009-05-13 05:11:43


Dear Gennadiy.
thanks a lot. This is very helpful!
Best Regards,
Ruediger

Gennadiy Rozental wrote:
> Ruediger Berlich wrote:
>> Hi there,
>>
>> I am using Boost.Test to run Unit tests for my code (Boost 1.39). For
>> each class, I have a number of tests (implemented through
>> BOOST_AUTO_TEST_CASE or BOOST_AUTO_TEST_CASE_TEMPLATE, respectively),
>> organized in test suites (arranged in BOOST_AUTO_TEST_SUITE blocks). Each
>> BOOST_AUTO_TEST_SUITE with the associated AUTO_TESTs is a separate
>> compilation unit, thus localted in its own file.
>
> An execution order is defined by the test tree structure, which in turn
> is defined by the order of the registration calls. When using manual
> registration
> you can carve you own order. If you employ automatic registration the
> only thing
> we can promise is the order of test cases within the same test file. I
> am not
> aware about the means to force particular global order of static
> initializers.
>
> > Is there a way to do this with the AUTO-environment, or do I have to
> resort
> > to manual registration of test suites and/or test cases ?
>
> You can use --run command line parameter to filter out only basic test
> units in
> first call and advanced test in second.
>
> Boost.Test does support test unit dependency. But:
>
> a) It only supported easily for manually registered test units. For
> automatically registered ones you'll need to jump through some hoops (for
> example you can define dependency in global fixture)
>
> b) Dependency does not actually affect test units order execution. This
> require
> potentially complicated reordering of the test tree, which is not
> implemented yet.
>
> 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