Boost logo

Boost Users :

Subject: Re: [Boost-users] [test] boost::test equivalent of CppUnit's "protectors" ?
From: Tim Day (timday_at_[hidden])
Date: 2009-05-14 09:20:12


On Tue, 2009-05-12 at 19:14 +0000, Gennadiy Rozental wrote:
> Tim Day <timday <at> bottlenose.demon.co.uk> writes:
> > Hmmm having played with it a bit, I'm at a bit of a dead-end with regard
> > to how or even whether it's possible for a test_observer to express the
> > opinion that the test should actually be considered failed. It's easy
>
> I can consider making this possible. For now try throwing exception from fixture.
>
> In general you should try to make your test cases self consistent, so that you
> would not need to test for side-effects outside of the test case.

Yes I'm now coming round more to thinking that if a test passed by it's
own rules, no external observer really has any business saying "no,
actually you failed". It probably does make more sense for such
observers to log their opinion "well you might think you passed, but I
really don't like the fact that you changed <whatever state observer is
monitoring>" somewhere sufficiently visible.

Tim


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