Update matchers.md

This commit is contained in:
Dino Radaković 2021-09-28 17:08:17 -04:00 committed by GitHub
parent 0876db7533
commit 74ebc58ec4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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`. |