Update matchers.md
This commit is contained in:
parent
0876db7533
commit
74ebc58ec4
@ -261,7 +261,7 @@ which must be a permanent callback.
|
||||
|
||||
## Defining Matchers
|
||||
|
||||
| Macro foo | Description |
|
||||
| Macro | Description |
|
||||
| :----------------------------------- | :------------------------------------ |
|
||||
| `MATCHER(IsEven, "") { return (arg % 2) == 0; }` | Defines a matcher `IsEven()` to match an even number. |
|
||||
| `MATCHER_P(IsDivisibleBy, n, "") { *result_listener << "where the remainder is " << (arg % n); return (arg % n) == 0; }` | Defines a matcher `IsDivisibleBy(n)` to match a number divisible by `n`. |
|
||||
|
Loading…
x
Reference in New Issue
Block a user