
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?

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
participants (2)
-
Gennadiy Rozental
-
Jody Hagins