marcossilvadecastro / 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 matchers #14

Closed GoogleCodeExporter closed 9 years ago

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

We can provide macros like

  MOCK_MATCHER(MatcherName) { .... matcher body ... }
  MOCK_MATCHER_P2(MatcherName, arg1_name, arg2_name) { ... matcher body ... 
}

to make defining single-use matchers even easier.

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

GoogleCodeExporter commented 9 years ago

Original comment by zhanyong...@gmail.com on 22 Feb 2009 at 5:53