|
Boost : |
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2007-02-19 02:44:43
John Maddock wrote:
> Gennadiy Rozental wrote:
>> Which particular words/statements you are having difficulties with?
>
> The problem for me is that it's too easy to forget that
> BOOST_CHECK_CLOSE refers to a persentage and not a relative error.
> I've lost count of how
> many times I've made that mistake, even though I do understand what
> it does.
>
> BOOST_CHECK_CLOSE_FRACTION is an improvement, but still doesn't spell
> out what it does.
>
> Personally I would have liked these to have been really explicit:
>
> BOOST_CHECK_PERSENTAGE_DIFFERENCE
> BOOST_CHECK_RELATIVE_DIFFERENCE
> BOOST_CHECK_EPSILON_DIFFERENCE
I'd just like to to add my vote for more explicit naming of the testing
macros. My personal preference would be the more terse, but IMHO still
understandable:
BOOST_(WARN|CHECK|REQUIRE)_DIFF_PERCENTAGE
BOOST_(WARN|CHECK|REQUIRE)_DIFF_RELATIVE
BOOST_(WARN|CHECK|REQUIRE)_DIFF_EPSILON
(I'm not a native english speaker, but it's "percentage" with a "c" -
right?)
/ Johan
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk