Boost logo

Boost :

Subject: Re: [boost] Boost_Test: Initialize fixture only once
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2010-03-01 15:44:58

Rhys Ulerich wrote:
>> I have set of test_suites. Every test_suite consists of a bunch of
>> test_cases. Every test case should be initialized before execution.
>> So, I created Fixture for every test_suite. The problem is Fixture
>> initialization takes a lot of time and boost creates it for every test_case
>> (not for every test_suite)
> Are you using BOOST_FIXTURE_TEST_SUITE per [1]? That should run once
> per test suite.

No. This is not the case. BOOST_FIXTURE_TEST_SUITE (as described in
docs) serve different purpose. It allows to specify fixture once per
suite for all test cases in test suite.

At the moment per-suite fixture is not implemented (the only one
actually). The only recommendation I have for you is to either use
GLOBAL_FIXTURE or use the first test case in a suite as a setup.


Boost list run by bdawes at, gregod at, cpdaniel at, john at