Closed GoogleCodeExporter closed 9 years ago
Another idea is to use matchers of pairs in Pointwise(). For example,
nullary Lt() matches a pair where the first field < the second field
(see http://go/matchers), so we can say:
EXPECT_THAT(vec1, Pointwise(Lt(), vec2));
to verify that each element in vec1 < the corresponding element in
vec2. This doesn't involve any lambda or callback. It doesn't let
you use existing EqualsProto(pb) matchers, so we'll need to define
nullary matchers like AreEqualProtos() to verify that the value it's
matching is a pair of equal protobufs. It's not a big deal if we can
easily define AreEqualsProtos() in terms of EqualsProto(pb).
Original comment by w...@google.com
on 6 Apr 2010 at 12:43
Original comment by vladlosev
on 20 May 2010 at 10:18
Original issue reported on code.google.com by
w...@google.com
on 23 Mar 2010 at 5:39