Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2005-01-29 10:18:49


Jody Hagins <jody-boost-011304 <at> atdesk.com> writes:

>
> I have a collection of boost:shared_ptr<>, and I want to test what they
> point to. CHECK_EQUAL_COLLECTION does not take a predicate, so what
> method do you suggest? Currently, I create "copies" of the collections
> with "holders" that invoke the comparison on the "pointed-to-object" but
> this seems a bit klunky.
>
> What is the preferred method for this type of collection?

You could use BOOST_CHECK_PREDICATE and implement you own custom predicate.

Gennadiy


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