Boost logo

Boost :

From: Bruce Trask (bruce.trask_at_[hidden])
Date: 2008-07-23 09:12:37


  Hi Dean,

  Take a look at libs/test/example/unit_test_example_07.cpp for suite
  level fixtures (for your case below) and
  libs/test/example/unit_test_example_09_1.cpp for global level fixtures.

  The docs on patmedia.com disappeared over weekend but Gennadiy is
  finding a new home for it.

  Regards,
  Bruce

Dean Michael Berris wrote:
> Hi Everyone,
>
> I've been using Boost.Test for a while already, and although I do
> think it's a very powerful library, it is a little unweildy to
> navigate the documentation of the library. For example, currently in
> the online documentation, links to the examples don't work correctly
> and there are areas which lead to "404" messages.
>
> The question is really simple though: when using BOOST_AUTO_TEST_CASE,
> how do I cut down on repetitive code and set up "fixtures"? For
> example, set up variables that are common in all test case bodies in
> the same file?
>
> I'm pretty confident there should be a way to do this -- and if there
> is, where do I find documentation on it?
>
> For now I'll resort to header-reading to find out how to use the
> macros, though it would be nice to have a one-stop library reference
> or guide for Boost.Test.
>
> TIA
>


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