Boost logo

Boost :

Subject: Re: [boost] Boost.Test updates in trunk: need for (mini) review?
From: Jan Hudec (bulb_at_[hidden])
Date: 2012-10-23 14:07:07


On Mon, Oct 22, 2012 at 21:54:59 +0200, Vicente J. Botet Escriba wrote:
> Le 22/10/12 02:55, Gennadiy Rozenal a écrit :
> >Vicente J. Botet Escriba <vicente.botet <at> wanadoo.fr> writes:
> >>> expected_failures - set expected failures for a test unit
> >>Could you give an example showing the utility of this decorator?
> >This is the same as an existing interface, but applied to auto test case. Yu
> >just telling the framework an amount of assertion failures to expect in test
> >unit, so these can be "ignored"
> My question is why the user wants to check the failures, s/he can
> just change the assertion, isn't it? Does the test succeeds if there
> is less failures than expected?

Expected failures are for the case where the test is implemented, but the
functionality is buggy. So you don't want to invert the assertion, you want
to mark that you know that the assertion isn't satisfied so you notice when
some other test fails.

The tests succeed when the tests that were expected to fail pass. It would be
nice if it printed some extra diagnostics (unexpected success), but I think
it currently only prints number of failures and how many of them were
expected, so the unexpected success is not so easy to notice.

-- 
						 Jan 'Bulb' Hudec <bulb_at_[hidden]>

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk