
"John Maddock" <john@johnmaddock.co.uk> wrote in message news:00ab01c7540d$7d100b60$3cef0352@fuji...
Gennadiy Rozental wrote:
Ok. How about
BOOST_CHECK_PRC_DIFF BOOST_CHECK_REL_DIFF BOOST_CHECK_EPS_DIFF
How about
BOOST_CHECK_ABS_DIFF
for absolute difference comparison?
Oh please no.... too cute and cryptic by half, they're not self-explanatory at all.
How about a compromise: BOOST_CHECK_PERCENT_DIFF BOOST_CHECK_RELATIVE_DIFF BOOST_CHECK_EPSILON_DIFF BOOST_CHECK_ABSOLUTE_DIFF (do we need this one?)
What kind of error message would you like for each tool to produce?
Here is an example of BOOS_CHECK_CLOSE produce:
difference between v1{1.23456e-10} and v2{1.234571e-10} exceeds 0.0001%
Which is fine if the tolerance is expressed as a percent, but not otherwise: the error quoted needs to be expressed in the same units as are passed to the macro, otherwise you'll just confuse folks again.
So.Would you care to provide a error message body for the non-percent based tools? Gennadiy