Boost logo

Boost :

From: Jens Seidel (jensseidel_at_[hidden])
Date: 2007-10-30 06:22:45


On Tue, Oct 30, 2007 at 10:03:41AM -0000, John Maddock wrote:
> Is there a way to check if the last BOOST_CHECK_CLOSE passed or failed?
>
> I need to print out some additional information if it failed so I can track
> down which test case it was (the checks are in a loop that iterates over a
> table of data).

In this case you should probably change the test. To be honest I have
the same problem that I need something similar to
BOOST_CHECK_EQUAL_COLLECTIONS which checks a range and creates
compressed output. I tried using custom predicate support
(http://www.boost.org/libs/test/doc/components/test_tools/custom_predicate_support.html)
but it is complicated ...

Using BOOST_CHECK_CLOSE in a loop sounds just wrong to me.

Jens


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