Suggest using generic lambdas for composing macros. Long chains of macros hurt legibility; generic lambdas are an easy way to abbreviate them, but are not an obvious solution to casual users. Compare: EXPECT_THAT(f(), ElementsAre( Property(&MyClass::foo, Property(&OtherClass::bar, Contains("x"))), Property(&MyClass::foo, Property(&OtherClass::bar, Contains("y")))); to: EXPECT_THAT(f(), ElementsAre(HasFooBar("x"), HasFooBar("y"))); PiperOrigin-RevId: 336870137pull/3060/head
parent
2cf1f99b97
commit
d11c76175f
1 changed files with 16 additions and 0 deletions
Loading…
Reference in new issue