Closed GoogleCodeExporter closed 9 years ago
CmpHelperEQ is an internal construct and overloading it for extending
functionality EXPECT_EQ is not supported.
vector supports operator == and as such should be comparable using EXPECT_EQ.
If you want correct printouts, define PrintTo for types of the values you
compare, as described in
http://code.google.com/p/googletest/wiki/AdvancedGuide#Teaching_Google_Test_How_
to_Print_Your_Values. If you need more customized output, consider using custom
assertion predicates
(http://code.google.com/p/googletest/wiki/AdvancedGuide#Predicate_Assertions_for
_Better_Error_Messages) or EXPECT_THAT() from Google Mock.
Original comment by vladlosev
on 9 Feb 2012 at 8:42
the printing is not the problem as i have overloaded the operator <<. but my
vector (Vector2<>) returns a Vector2<bool> for operator ==, but seems that this
can be done with EXPECT_THAT(). I also need a "epsilon equals" which also seems
possible with EXPECT_THAT(), so i'll look at this.
why is EXPECT_THAT in google mock and not in google test?
Original comment by jochen.w...@googlemail.com
on 9 Feb 2012 at 8:58
Original issue reported on code.google.com by
jochen.w...@googlemail.com
on 23 Jan 2012 at 5:37