Boost logo

Boost Users :

Subject: Re: [Boost-users] [test] boost::test equivalent of CppUnit's "protectors" ?
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2009-05-12 15:14:02


Tim Day <timday <at> bottlenose.demon.co.uk> writes:

>
> On Mon, 2009-05-11 at 11:50 +0100, Tim Day wrote:
> > But failing a test within a test_observer::test_finish() call seems
> > like it ought to be a cleaner place to do it.
>
> 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.


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