Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost test and openmpi
From: Richard (legalize+jeeves_at_[hidden])
Date: 2014-05-20 15:16:13


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

boost-users_at_[hidden] spake the secret code
<loom.20140520T095957-837_at_[hidden]> thusly:

>> That is, a global fixture is only "global" for a single translation
>> unit and not multiple translation units.
>
>No. This is not true. Global fixture is indeed global and is executed once
>per test module regardless which test file it is defined in. And it is done
>before the testing begins.

By "test module", I assume you are referring to the executable. I
don't know why we need another term for this, but that's a different
discussion.

I'll do my testing again, but this is inconsistent with what I
observed from this example:

I agree that what you describe is how it was documented, but it wasn't
what I observed.

Look at the source code here:
<http://user.xmission.com/~legalize/boost.test/libs/test/doc/html/test/reference/test_case/boost_global_fixture.html>

When I ran those test cases, I would see some test cases printing
their output before all the global fixtures were created. I will try
again when I get home.

-- 
"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