|
Boost : |
From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2007-02-14 11:03:04
"Jody Hagins" <jody-boost-011304_at_[hidden]> wrote in message
news:20070214094735.45466bf3.jody-boost-011304_at_atdesk.com...
> On Wed, 14 Feb 2007 09:19:29 -0000
> "John Maddock" <john_at_[hidden]> wrote:
>
>> Like you I think the whole persentage thing was a big mistake: even
>> though I know what the API does and use it all the time, forgetting
>> to convert to a persentage is the by far the most common fowl-up.
Latest version contains two macros: one for percentage based comparison, one
for fraction based one.
> The interface requiring percentages is bad enough. The explanations in
> the documentation are even worse.
Do you have any particular complains?
> Just to remind everyone, I'm a strong supporter of Boost.Test, and have
> stated so many times. Unfortunately, that macro causes more problems
> than it solves.
Could you please clarify.
> I'd make a stab at helping Gennadiy clarify the
> documentation, but I can't even explain how it is supposed to be used to
> myself.
Docs says: " Last third parameter defines the tolerance for the comparison
in percentage units". This combined with example and error message produced:
test.cpp(4) : error in test_main: difference between v1{1.23456e-10} and
v2{1.23457e-10} exeeds 1e-04%
should give you some level of understanding. Try explaining now fraction
based comparisons to anyone not an expert.
But if you are willing to provide an updated version for the pages related
to the FP comparison you are very welcome
> I would love to see a new macro for testing floating point values.
What semantic you would like to see?
Gennadiy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk