Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2006-11-08 12:02:22


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?

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

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!

Many thanks, John.


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