Merge 15de0806de
into a866428a78
This commit is contained in:
commit
35a4ec7b01
@ -1,8 +1,10 @@
|
|||||||
# Actions Reference
|
# Actions Reference
|
||||||
|
|
||||||
[**Actions**](../gmock_for_dummies.md#actions-what-should-it-do) specify what a
|
[**Actions**](../gmock_for_dummies.md#actions-what-should-it-do) specify what a
|
||||||
mock function should do when invoked. This page lists the built-in actions
|
mock function should do when invoked.
|
||||||
provided by GoogleTest. All actions are defined in the `::testing` namespace.
|
This page lists the built-in actions provided by GoogleTest.
|
||||||
|
To use them, add #include <gmock/gmock.h>.
|
||||||
|
All actions are defined in the `::testing` namespace.
|
||||||
|
|
||||||
## Returning a Value
|
## Returning a Value
|
||||||
|
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
# Matchers Reference
|
# Matchers Reference
|
||||||
|
|
||||||
A **matcher** matches a *single* argument. You can use it inside `ON_CALL()` or
|
A **matcher** matches a *single* argument.
|
||||||
|
This page lists the built-in matchers provided by GoogleTest.
|
||||||
|
To use them, add `#include <gtest/gtest.h>`.
|
||||||
|
All matchers are defined in the `::testing` namespace unless otherwise noted.
|
||||||
|
|
||||||
|
You can use a matcher inside `ON_CALL()` or
|
||||||
`EXPECT_CALL()`, or use it to validate a value directly using two macros:
|
`EXPECT_CALL()`, or use it to validate a value directly using two macros:
|
||||||
|
|
||||||
| Macro | Description |
|
| Macro | Description |
|
||||||
@ -21,8 +26,7 @@ expected_value)`.
|
|||||||
Built-in matchers (where `argument` is the function argument, e.g.
|
Built-in matchers (where `argument` is the function argument, e.g.
|
||||||
`actual_value` in the example above, or when used in the context of
|
`actual_value` in the example above, or when used in the context of
|
||||||
`EXPECT_CALL(mock_object, method(matchers))`, the arguments of `method`) are
|
`EXPECT_CALL(mock_object, method(matchers))`, the arguments of `method`) are
|
||||||
divided into several categories. All matchers are defined in the `::testing`
|
divided into several categories.
|
||||||
namespace unless otherwise noted.
|
|
||||||
|
|
||||||
## Wildcard
|
## Wildcard
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user