Googletest export
Mark ACTION_Pn()-generated functions as must-use-result. This catches when a client creates an action and discards it, thinking that the action has actually been applied to something. This will help people who make the mistake of defining, for example, both `void Use(Foo*)` and `ACTION(Use) { Use(arg); }` for later application to a Foo. With such an overload, a client may then write `Use();`, forgetting the param and being confused why nothing happens. This also catches when a client defines their own action in terms of an ACTION()-generated one, invokes the ACTION's builder, and then fails to invoke the resulting action, thinking it's operating on the outer action's parameters. PiperOrigin-RevId: 330614454
Showing
- googlemock/include/gmock/gmock-actions.h 4 additions, 0 deletionsgooglemock/include/gmock/gmock-actions.h
- googlemock/include/gmock/gmock-generated-actions.h 25 additions, 0 deletionsgooglemock/include/gmock/gmock-generated-actions.h
- googlemock/include/gmock/gmock-generated-actions.h.pump 21 additions, 1 deletiongooglemock/include/gmock/gmock-generated-actions.h.pump
Loading
Please register or sign in to comment