Boost logo

Boost :

Subject: Re: [boost] new test macros
From: Christian Holmquist (c.holmquist_at_[hidden])
Date: 2011-02-04 15:11:13


On 4 February 2011 11:11, Thorsten Ottosen <thorsten.ottosen_at_[hidden]>wrote:

> Dear Boost.Test Maintainer,
>
> I think it would be useful to add the following macros
> to Boost.Test:
>
> #define BOOST_CHECK_EQUAL_RANGE( Rng1, Rng2 ) \
> BOOST_CHECK_EQUAL_COLLECTIONS( boost::begin(Rng1), boost::end(Rng1), \
> boost::begin(Rng2), boost::end(Rng2) )
>
> And it would also be nice to have BOOST_CHECK_CLOSE_RANGE/COLLECTION.
>
>
Wouldn't it scale better and easier if Test macros that play along with
Boost.Test infrastructure be hosted in the specific library, i.e
boost/range/test.hpp
instead of having it in the Test library itself?
There's virtually no end to the amount of useful TEST_MACROS, and I think
that the Boost.Test maintainer should not need to judge each and everyone of
them to see they are 'useful enough' to be part of the core library. If
author X finds a useful macro for his library Y and wants to document it for
his end-users, let him/her do so in his own library.

Some users will find that TEST_RANGE macros are fundamental to their work,
others floating point tests, integer tests, string tests etc..
Just as serialization support isn't added to boost/serialization/ for each
serializable data type in boost, neither should test functions/macros IMHO.

My cents,
- Christian


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