
"Johan Nilsson" <r.johan.nilsson@gmail.com> wrote in message news:erc3he$lfo$1@sea.gmane.org...
How about a compromise:
BOOST_CHECK_PERCENT_DIFF BOOST_CHECK_RELATIVE_DIFF BOOST_CHECK_EPSILON_DIFF BOOST_CHECK_ABSOLUTE_DIFF (do we need this one?)
I "need" it - as an example, I'm using absolute diffs to verify that the outcome of conversions back and forth between different coordinate systems are correct within a certain amount of (length) units.
As I've mentioned in another place in this thread, I'd personally prefer to have the type of difference check encoded at the end of the macro names. A matter of personal taste, I guess.
There is another alternatve: BOOST_CHECK_DIFF( a,b, PERCENT( t ) ) BOOST_CHECK_DIFF( a,b, RELATIVE( t ) ) BOOST_CHECK_DIFF( a,b, EPSILON( t ) ) BOOST_CHECK_DIFF( a,b, ABSOLUTE( t ) ) We could either use macro based solution BOOST_CHECK_DIFF( a,b, c ) \ BOOST_CHECK_DIFF_IMPL( a,b, BOOST_CHECK_DIFF_TOL_ # c ) or function overloading based. But it could be less convinient even if a bit safer (from macro redefinitions)
I assume that the WARN/REQUIRE variants would be added as well?
Yes Gennadiy