wangyu5 / googlemock

Automatically exported from code.google.com/p/googlemock
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Need to provide an easier way to define custom actions #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A user can define a custom action either by defining a free function or 
implementing the ActionInterface.  Google Mock provides several helpers to 
make the latter easier, but still they are not quite straightforward.

We can provide macros like

  MOCK_ACTION(ActionName) { .... action body ... }
  MOCK_ACTION_P2(ActionName, arg1_name, arg2_name) { ... action body ... }

to make defining single-use actions even easier.

Original issue reported on code.google.com by shiq...@gmail.com on 23 Dec 2008 at 5:11

GoogleCodeExporter commented 9 years ago
ACTION* are implemented in the trunk.

Original comment by zhanyong...@gmail.com on 13 Jan 2009 at 11:46