|
Boost : |
From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2005-11-13 09:43:53
"John Maddock" <john_at_[hidden]> wrote in message
news:003c01c5e791$4b0cee60$19d96b51_at_fuji...
>> 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 :-/
I am working on Boost.Test update these days. I hope it to be soon.
> Has to be a new tool, too much would break otherwise, I like the name
> BOOST_CHECK_CLOSE_EPSILON suggested elsewhere.
Ok. So be it. Actually An ideal solution would be somethind like:
BOOST_CHECK_CLOSE( a, b , 0.5% ) - test in percents
BOOST_CHECK_CLOSE( a, b , 0.05) - test in epsilon
But I couldn't figure out how implement it
>> 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 :-)
Absolute difference would clutter output. Especially since it could be
completely unrelated. I am not sure we want this always.
Gennadiy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk