summaryrefslogtreecommitdiffstats
path: root/docs/reference
diff options
context:
space:
mode:
authorHyuk Myeong <hyuk.myeong@lge.com>2021-06-13 10:50:40 (GMT)
committerHyuk Myeong <hyuk.myeong@lge.com>2021-06-13 10:53:04 (GMT)
commit1745a405eb7c70e0e4488023a4f2c69fd6faed4f (patch)
tree929ae0feb2906134de5606bedf8f8b0de3547c06 /docs/reference
parente2239ee6043f73722e7aa812a459f54a28552929 (diff)
downloadgoogletest-1745a405eb7c70e0e4488023a4f2c69fd6faed4f.zip
googletest-1745a405eb7c70e0e4488023a4f2c69fd6faed4f.tar.gz
googletest-1745a405eb7c70e0e4488023a4f2c69fd6faed4f.tar.bz2
Diffstat (limited to 'docs/reference')
-rw-r--r--docs/reference/actions.md14
-rw-r--r--docs/reference/matchers.md2
2 files changed, 8 insertions, 8 deletions
diff --git a/docs/reference/actions.md b/docs/reference/actions.md
index 166d2a8..ab81a12 100644
--- a/docs/reference/actions.md
+++ b/docs/reference/actions.md
@@ -6,7 +6,7 @@ provided by GoogleTest. All actions are defined in the `::testing` namespace.
## Returning a Value
-| | |
+| Action | Description |
| :-------------------------------- | :-------------------------------------------- |
| `Return()` | Return from a `void` mock function. |
| `Return(value)` | Return `value`. If the type of `value` is different to the mock function's return type, `value` is converted to the latter type <i>at the time the expectation is set</i>, not when the action is executed. |
@@ -20,7 +20,7 @@ provided by GoogleTest. All actions are defined in the `::testing` namespace.
## Side Effects
-| | |
+| Action | Description |
| :--------------------------------- | :-------------------------------------- |
| `Assign(&variable, value)` | Assign `value` to variable. |
| `DeleteArg<N>()` | Delete the `N`-th (0-based) argument, which must be a pointer. |
@@ -38,9 +38,9 @@ provided by GoogleTest. All actions are defined in the `::testing` namespace.
In the following, by "callable" we mean a free function, `std::function`,
functor, or lambda.
-| | |
+| Action | Description |
| :---------------------------------- | :------------------------------------- |
-| `f` | Invoke f with the arguments passed to the mock function, where f is a callable. |
+| `f` | Invoke `f` with the arguments passed to the mock function, where `f` is a callable. |
| `Invoke(f)` | Invoke `f` with the arguments passed to the mock function, where `f` can be a global/static function or a functor. |
| `Invoke(object_pointer, &class::method)` | Invoke the method on the object with the arguments passed to the mock function. |
| `InvokeWithoutArgs(f)` | Invoke `f`, which can be a global/static function or a functor. `f` must take no arguments. |
@@ -86,7 +86,7 @@ value, and `foo` by reference.
## Default Action
-| Matcher | Description |
+| Action | Description |
| :------------ | :----------------------------------------------------- |
| `DoDefault()` | Do the default action (specified by `ON_CALL()` or the built-in one). |
@@ -96,7 +96,7 @@ composite action - trying to do so will result in a run-time error.
## Composite Actions
-| | |
+| Action | Description |
| :----------------------------- | :------------------------------------------ |
| `DoAll(a1, a2, ..., an)` | Do all actions `a1` to `an` and return the result of `an` in each invocation. The first `n - 1` sub-actions must return void and will receive a readonly view of the arguments. |
| `IgnoreResult(a)` | Perform action `a` and ignore its result. `a` must not return void. |
@@ -106,7 +106,7 @@ composite action - trying to do so will result in a run-time error.
## Defining Actions
-| | |
+| Macro | Description |
| :--------------------------------- | :-------------------------------------- |
| `ACTION(Sum) { return arg0 + arg1; }` | Defines an action `Sum()` to return the sum of the mock function's argument #0 and #1. |
| `ACTION_P(Plus, n) { return arg0 + n; }` | Defines an action `Plus(n)` to return the sum of the mock function's argument #0 and `n`. |
diff --git a/docs/reference/matchers.md b/docs/reference/matchers.md
index 9e40cab..8697060 100644
--- a/docs/reference/matchers.md
+++ b/docs/reference/matchers.md
@@ -259,7 +259,7 @@ which must be a permanent callback.
## Defining Matchers
-| Matcher | 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`. |