|
Boost : |
From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2006-11-08 13:48:01
"John Maddock" <john_at_[hidden]> wrote in message
news:000701c70357$ae886180$c9541b56_at_fuji...
>I have a couple of annoying issues with Boost.Test's output on failed
>tests:
>
> 1) The printing code doesn't restore the iostream's original precision
> after
> it's changed it for formatted output. It's a minor issue but very
> annoying
> at times :-) Looks trivial to patch in print_log_value as well?
Ok.
> 2) If the type has no numeric_limits support, say if it's a composite
> type,
> like std::complex<double> then you don't get enough digits to tell what
> the
> problem is. Could the code default to whatever digits long-double has?
> Again a minor change to print_log_value (in my experience std lib's ignore
> requests for more digits than a type really has anyway, so it should be
> harmless?).
Could you provide the code?
> 3) If a BOOST_CHECK_CLOSE fails, you get the two values, but not what the
> %
> difference between them was. And it's the % difference that matters :-)
> I
> know this has come up before, but it's still bugging me. Here's the
> problem: if the type is say a 128-bit long double then you get two very
> long
> 35-digit numbers printed out: which have two many digits for the average
> calculator, so you can't even calculate the % difference manually to see
> how
> far off you were!
OK I will look again once I have a moment.
Gennadiy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk