Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-05-25 14:23:25


"Gennadiy Rozental" <gennadiy.rozental_at_[hidden]> wrote in message
news:d72du0$fbr$1_at_sea.gmane.org...
|
| "Thorsten Ottosen" <nesotto_at_[hidden]> wrote in message
| news:d72cp4$bhu$1_at_sea.gmane.org...
| > "Gennadiy Rozental" <gennadiy.rozental_at_[hidden]> wrote in message
| > news:d726p5$k5p$1_at_sea.gmane.org...
| > | using namespace std;
| > | using namespace boost;
| > |
| > | > BOOST_CHECK_NOT_EQUAL(x,y)
| > |
| > | BOOST_CHECK_PREDICATE( not_equal_to<T>(), (x)(y) );
| > |
| > | > BOOST_CHECK_NOT_CLOSE(x,y)
| > |
| > | BOOST_CHECK_PREDICATE( not( test_tools::check_is_close ),
| > | (x)(y)(tolerance) );
| >
| > ok, but I still think it is too much of typing to do what I need in a
| > straightforward manner.
|
| There are a lot of predicates: > , < >=, != etc. Add conjunctions and you
| will have exponential amount.

and don't add them, and you have a linear amount.

| I couldn't incorporate all possible predicates
| into library. Instead I provide generic tool. If you need this frequently in
| some test module you could define one yourself.

then why did you provide CHECK_EQUAL ? Afterall, it can be done with
the generic tool.

surely it wouldn't be too hard to write first hand tools for ==, !=, <, <=
to give users the most pleasent experience ? (> and >= is not needed as we can
reverse the arguments)

-Thorsten


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