|
Boost : |
From: John Maddock (john_at_[hidden])
Date: 2005-11-12 08:59:10
> This is doable. The message would sould like this:
>
> difference between var1 {<value>} and var2 {<value>} is x% and
> exceeds e%
Good. This one is quite pressing for me, as there are some failing tests I
can't diagnose otherwise :-/
>> 2) Can we please have a BOOST_CHECK_EPSILON, that uses a whole
>> number of epsilon as the tolerance? IMO BOOST_CHECK_CLOSE should
>> have been written this way to begin with, but it's too late now
>
> Actually it was this way originally. It was causing constant
> confusion with absolute comparison. I thought persents will bring
> better message. Unfortunately many users since then indicated that
> original version (for those who knew how to use it) was better. If
> there is a general consensus I am willing to rollback. Or we could
> introduce a new tool.
Has to be a new tool, too much would break otherwise, I like the name
BOOST_CHECK_CLOSE_EPSILON suggested elsewhere.
>> Again it should print out
>> the actual relative error as a multiple of epsilon as well as the
>> input values. Actually while we're at it the absolute error may be
>> useful to have
>> in some situations as well :-)
>
> This one already exists: BOOST_CHECK_SMALL( v, epsilon )
Sorry that's not what I meant, I meant when BOOST_CHECK_CLOSE or
BOOST_CHECK_CLOSE_EPSILON fail then they should print out:
The two input values.
The max relative error permitted.
The actual relative error found.
The actual absolute error found.
More information is a good thing in this case :-)
Regards, John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk