Boost logo

Boost :

From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2008-07-23 13:17:32


Dean Michael Berris <mikhailberis <at> gmail.com> writes:
> Thanks, I've elected to convert my tests to use
> BOOST_FIXTURE_TEST_CASE ( testname, fixture_class_name ) instead. Now
> though, everything looks redundant because I have to put the name of
> the fixture class everywhere I have BOOST_FIXTURE_TEST_CASE (...).

Use BOOST_FIXTURE_TEST_SUITE and all test cases inside this test suite will get
fixture automatically (see unit_test_example_07.cpp for example)
 
> I notice that there's a global level fixtures, but I'm more interested
> in something that get constructed/destroyed with every test case
> invocation -- much like the setUp() and tearDown() overloads in the
> xUnit family of frameworks.

The fixtures *are* constructed/destroyed per test case.
 
Gennadiy


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk