Boost logo

Boost :

Subject: Re: [boost] [test] Interest in 'hamcrest'-style checks?
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-09-14 12:04:14


Le 13/09/13 17:38, Jared Grubb a écrit :
> On Sep 10, 2013, at 21:12, Gennadiy Rozental <rogeeff_at_[hidden]> wrote:
>
>
>> 3. Boost.Test already have this macro. It is called BOOST_CHECK_PREDICATE
>>
>> BOOST_CHECK_PREDICATE( P, (a)(b)(c) );
>>
>> Very nice symmetry and most of your your other points covered (stackability
>> etc)
> I hadnt seen that one; I tried it, but it does require extra parens that I find distracting:
>
> BOOST_CHECK_PREDICATE(vec, (Contains(42)));

I suspect that you need to use something like

   BOOST_CHECK_PREDICATE(Contains, (vec)(42) );

Best,
Vicente


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