Skip to content

Commit

Permalink
Export Test - Do Not Merge
Browse files Browse the repository at this point in the history
Address OSS Issue #2463 #2463

PiperOrigin-RevId: 333289989
  • Loading branch information
Abseil Team authored and vslashg committed Sep 23, 2020
1 parent db62382 commit bfb3304
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
9 changes: 5 additions & 4 deletions googlemock/docs/cook_book.md
Original file line number Diff line number Diff line change
Expand Up @@ -1132,10 +1132,11 @@ Hamcrest project, which adds `assertThat()` to JUnit.

### Using Predicates as Matchers

gMock provides a [built-in set](#MatcherList) of matchers. In case you find them
lacking, you can use an arbitrary unary predicate function or functor as a
matcher - as long as the predicate accepts a value of the type you want. You do
this by wrapping the predicate inside the `Truly()` function, for example:
gMock provides a [built-in set](cheat_sheet.md#MatcherList) of matchers. In case
you find them lacking, you can use an arbitrary unary predicate function or
functor as a matcher - as long as the predicate accepts a value of the type you
want. You do this by wrapping the predicate inside the `Truly()` function, for
example:

```cpp
using ::testing::Truly;
Expand Down
8 changes: 5 additions & 3 deletions googletest/docs/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,11 @@ Verifies that `val1` is less than, or almost equal to, `val2`. You can replace
### Asserting Using gMock Matchers
[gMock](../../googlemock) comes with a library of matchers for validating
arguments passed to mock objects. A gMock *matcher* is basically a predicate
that knows how to describe itself. It can be used in these assertion macros:
[gMock](../../googlemock) comes with
[a library of matchers](../../googlemock/docs/cheat_sheet.md#MatcherList) for
validating arguments passed to mock objects. A gMock *matcher* is basically a
predicate that knows how to describe itself. It can be used in these assertion
macros:
<!-- mdformat off(github rendering does not support multiline tables) -->
Expand Down

0 comments on commit bfb3304

Please sign in to comment.