Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost.test] 0 return code with expected failures?
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2010-04-15 21:53:23


Ahmed Badran <ahmed.badran <at> gmail.com> writes:
> Ahhhh, finally found the difference, example 8 works
> as I would expect. Turns out that my test case had a
> BOOST_REQUIRE rather than a BOOST_CHECK (like example 8),
> so it turns out that a test case that has a
> BOOST_REQUIRE and is flagged as a known issues still
> causes a non-zero exit status which is not what I would
> expect since the test was flagged as a known issue anyway.
> Is that the intended behavior? Or would you
> consider revising this behavior in a future release?
> I appreciate your help.

You can't "expect" fatal errors. The easiest way to deal with this is to store
the result in boolean variable and use BOOST_CHECK in it. The rest of the test
can be conditioned on the variable name.

Gennadiy


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