Boost logo

Boost :

From: Jody Hagins (jody-boost-011304_at_[hidden])
Date: 2007-02-14 15:25:29


On Wed, 14 Feb 2007 11:03:04 -0500
"Gennadiy Rozental" <gennadiy.rozental_at_[hidden]> wrote:

> Latest version contains two macros: one for percentage based
> comparison, one for fraction based one.

Great! I'll take a look when it is released.

> > The interface requiring percentages is bad enough. The explanations
> > in the documentation are even worse.
>
> Do you have any particular complains?

Nothing particular, other than I could not understand how to use it. I
even tried several examples myself. I would call it with hard coded
values that I thought should fail, and it would pass. I had similar
problems on the other side where tests I though should pass would fail.

So, I just stopped trying to use it.

> > 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.

For me, it is too cumbersome, and the definition of "close" is obscure.
I had several tests that used the macro, and the tests started failing
on valid values. Changing how the macro was invoked caused previously
passing tests to fail. Obviously, I was missing something badly.

I ended up reverting back to a poor, but at least well understood,
principle of using an epsilon value as it was appropriate for those
situations.

> 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 be very willing, however I simply do not understand the current
interface so I doubt I could explaint it to anyone. I know the docs are
there. However, after reading them, I'm still in the dark. I can't
prove the inadequacy, only state that I am unable to properly use the
interface based on the docs and examples.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk