I have a list of objects and a list of expected values that the objects can evaluate to after running them through a function.
std::vector<Objects> actual;
std::vector<Enum> expected;
bool equals(Object one, Enum two);
I want to be able to do something like UnorderedElementsAre
with a matcher or use Pointwise
without expecting an order.
I have a couple thoughts for solutions, but I'm looking for other suggestions (especially one's more native to gtest or that make the test easier to read)
actual
then use Pointwise
actual
to the corresponding Enum
value then do UnorderedElementsAre
on that list and expected
I know this is relatively an old question, anyway I think it's worth to mention that UnorderedPointwise
container matcher is likely what you were looking for.