googletest/googlemock/docs
Abseil Team d11c76175f Googletest export
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: 336870137
2020-10-14 18:25:40 -04:00
..
cheat_sheet.md Googletest export 2020-08-23 23:50:54 -04:00
community_created_documentation.md Googletest export 2020-05-13 00:39:40 -04:00
cook_book.md Googletest export 2020-10-14 18:25:40 -04:00
for_dummies.md Googletest export 2020-08-12 02:41:20 -04:00
gmock_faq.md Googletest export 2020-08-12 02:41:20 -04:00
pump_manual.md Googletest export 2020-08-12 02:41:20 -04:00