|
Boost Users : |
Subject: Re: [Boost-users] [boost.test] 0 return code with expected failures?
From: Ahmed Badran (ahmed.badran_at_[hidden])
Date: 2010-04-16 14:21:41
On 4/15/2010 6:53 PM, Gennadiy Rozental wrote:
> 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.
I guess you're right, the test really wasn't expecting fatal errors, it was more along the lines of require this precondition (the boost require check) before running the actual test within a single unit test. Then again these tests are now considered acceptable failures, but I do not want to disable them for history and tracking purposes.
-Ahmed
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