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-11 10:55:50


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
enough for the observer to log out its opinion as text, but attempting
to throw or use a BOOST_CHECK or similar (e.g direct call to
framework::assertion_result or test_unit_aborted) within
test_observer::test_finish() generally results in something like
"Boost.Test framework internal error: unknown reason." or an access
violation.

Any suggestions ?

(Previous experience suggests tests can spew logs and warnings all they
like, but it takes an actual failure to really get attention).

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