From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2008-02-18 15:06:15
Gennadiy Rozental skrev:
> Thorsten Ottosen <thorsten.ottosen <at> dezide.com> writes:
>> then why not add
>> BOOST_CHECK_EQUAL_RANGE( Rng1, Rng2 )
>> // implement by calling make_iterator_range() on the two arguments
Actually, this is too naive an implementation as iterator_range<> lacks
>,>=,<=. Hm. Maybe I should add those.
There is one more annoyance, I think. std::pair<T,U> lacks a
operator<<() which means the following will fail:
BOOST_CHECK_EQUAL_RANGE( ba::map_list_of("foo",1)("bar",2), get_map() );
Is it reasonable that operator<<() is required when we simply want to
test comparison with ==? Perhaps there should be a way to get rid of
>> Also, I would like to see
>> BOOST_CHECK_NE_RANGE( Rng1, Rng2 )
>> BOOST_CHECK_GT_RANGE( Rng1, Rng2 )
>> BOOST_CHECK_GE_RANGE( Rng1, Rng2 )
>> BOOST_CHECK_LT_RANGE( Rng1, Rng2 )
>> BOOST_CHECK_LE_RANGE( Rng1, Rng2 )
> I guess it make sence now. The only problem I would prefer to avoid extra
> dependency on range library. I can put it into separate header.
That is quite ok. Just include everything in that header then.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk