Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.Test] reporting tests with warnings
From: Olaf Meeuwissen (olaf.meeuwissen_at_[hidden])
Date: 2011-11-17 01:29:47


Gennadiy Rozental <rogeeff_at_[hidden]> writes:

> Richard <legalize+jeeves <at> mail.xmission.com> writes:
>> >Boost.Test already support three "symbols":
>> >
>> > BOOST_REQUIRE_*
>> > BOOST_CHECK_*
>> > BOOST_WARN_*
>> >
>> >What you're seems to be implying is that BOOST_WARN_* is a bad idea.
>>
>> Not just BOOST_WARN_*, but also BOOST_CHECK_* since they keep
>> executing a failed test case.
>
> Why so radical view? This is TDD purist position and is not
> necessarily the only one.

FTR, I use Boost.Test for TDD and want test cases to continue execution
even though an assertion has failed already. It let's me see what part
of the test case is already working (even if just by accident ;-)

True purists stop the whole test suite at the first failed assertion ;-P
Those same people abhor make's --keep-going option and have instructed
their compilers to quit at the first warning ;-)

Seriously, I like to get an overview of all the things that don't work
yet (or have been broken) before I decide where to start fixing stuff.
That's also why I like to have BOOST_WARN_* around so I can add tests
*now* that are not targetted for the current milestone. When these
tests become relevant to a milestone, I switch them to BOOST_CHECK_*.
The warnings serve as a reminder of things to come.

>> If you keep executing a test case
>> that's already failed, it is highly likely in C++ that the test
>> runner will simply crash.
>
> This is simply not true.

The only times Boost.Test runner has crashed for me was during test case
registration and because of my stupidity.

Hope this helps,

-- 
Olaf Meeuwissen, LPIC-2           FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962               Help support software freedom
                 http://www.fsf.org/jf?referrer=1962

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