Boost logo

Boost Users :

Subject: Re: [Boost-users] [Test] Global Fixtures
From: Richard (legalize+jeeves_at_[hidden])
Date: 2014-10-03 01:18:51


[Please do not mail me a copy of your followup]

Mauricio Carneiro <carneiro_at_[hidden]> spake the secret code
<CAG0Owo1Qc15CqQMqHLAAmwv4UXPyn5ZW+kzrmkvVhv2srj5mxg_at_[hidden]> thusly:

>I am trying to use global fixtures in my tests but I may be misinterpreting
>the documentations.

Did you look here?
<http://user.xmission.com/~legalize/boost.test/libs/test/doc/html/test/reference/test_case/boost_global_fixture.html>

>The following toy example doesn't work :

Correct. The global fixture won't become the base class of your test
cases. Use BOOST_FIXTURE_TEST_CASE to make a fixture the base class
of a particular test case or BOOST_FIXTURE_TEST_SUITE to make a
fixture the base class of all test cases in a suite.

BOOST_GLOBAL_FIXTURE is for global setup/teardown where the c'tor runs
before any test case and the d'tor runs after all test cases.

-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
     The Computer Graphics Museum <http://computergraphicsmuseum.org>
         The Terminals Wiki <http://terminals.classiccmp.org>
  Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

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