Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
0ffd8629
Commit
0ffd8629
authored
Jul 01, 2017
by
Carlos O'Ryan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More tables that did not render correctly.
parent
2fcbc0c1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
1 deletion
+9
-1
CookBook.md
googlemock/docs/CookBook.md
+3
-1
CookBook.md
googlemock/docs/v1_5/CookBook.md
+2
-0
CookBook.md
googlemock/docs/v1_6/CookBook.md
+2
-0
CookBook.md
googlemock/docs/v1_7/CookBook.md
+2
-0
No files found.
googlemock/docs/CookBook.md
View file @
0ffd8629
...
@@ -3348,6 +3348,7 @@ For example, when using an `ACTION` as a stub action for mock function:
...
@@ -3348,6 +3348,7 @@ For example, when using an `ACTION` as a stub action for mock function:
int DoSomething(bool flag, int* ptr);
int DoSomething(bool flag, int* ptr);
```
```
we have:
we have:
| **Pre-defined Symbol** | **Is Bound To** |
| **Pre-defined Symbol** | **Is Bound To** |
|:-----------------------|:----------------|
|:-----------------------|:----------------|
| `
arg0
` | the value of `
flag
` |
| `
arg0
` | the value of `
flag
` |
...
@@ -3509,6 +3510,7 @@ is asked to infer the type of `x`?
...
@@ -3509,6 +3510,7 @@ is asked to infer the type of `x`?
If you are writing a function that returns an `
ACTION
` object, you'll
If you are writing a function that returns an `
ACTION
` object, you'll
need to know its type. The type depends on the macro used to define
need to know its type. The type depends on the macro used to define
the action and the parameter types. The rule is relatively simple:
the action and the parameter types. The rule is relatively simple:
| **Given Definition** | **Expression** | **Has Type** |
| **Given Definition** | **Expression** | **Has Type** |
|:---------------------|:---------------|:-------------|
|:---------------------|:---------------|:-------------|
| `
ACTION(Foo)
` | `
Foo()
` | `
FooAction
` |
| `
ACTION(Foo)
` | `
Foo()
` | `
FooAction
` |
...
@@ -3516,7 +3518,7 @@ the action and the parameter types. The rule is relatively simple:
...
@@ -3516,7 +3518,7 @@ the action and the parameter types. The rule is relatively simple:
| `
ACTION_P(Bar, param)
` | `
Bar(int_value)
` | `
BarActionP
<int>
` |
| `
ACTION_P(Bar, param)
` | `
Bar(int_value)
` | `
BarActionP
<int>
` |
| `
ACTION_TEMPLATE(Bar, HAS_m_TEMPLATE_PARAMS(...), AND_1_VALUE_PARAMS(p1))
` | `
Bar
<t1
,
...,
t_m
>
(int_value)
` | `
FooActionP
<t1
,
...,
t_m
,
int
>
` |
| `
ACTION_TEMPLATE(Bar, HAS_m_TEMPLATE_PARAMS(...), AND_1_VALUE_PARAMS(p1))
` | `
Bar
<t1
,
...,
t_m
>
(int_value)
` | `
FooActionP
<t1
,
...,
t_m
,
int
>
` |
| `
ACTION_P2(Baz, p1, p2)
` | `
Baz(bool_value, int_value)
` | `
BazActionP2
<bool
,
int
>
` |
| `
ACTION_P2(Baz, p1, p2)
` | `
Baz(bool_value, int_value)
` | `
BazActionP2
<bool
,
int
>
` |
| `
ACTION_TEMPLATE(Baz, HAS_m_TEMPLATE_PARAMS(...), AND_2_VALUE_PARAMS(p1, p2))
`
| `
Baz
<t1
,
...,
t_m
>
(bool_value, int_value)
` | `
FooActionP2
<t1
,
...,
t_m
,
bool
,
int
>
` |
| `
ACTION_TEMPLATE(Baz, HAS_m_TEMPLATE_PARAMS(...), AND_2_VALUE_PARAMS(p1, p2))
`| `
Baz
<t1
,
...,
t_m
>
(bool_value, int_value)
` | `
FooActionP2
<t1
,
...,
t_m
,
bool
,
int
>
` |
| ... | ... | ... |
| ... | ... | ... |
Note that we have to pick different suffixes (`
Action
`, `
ActionP
`,
Note that we have to pick different suffixes (`
Action
`, `
ActionP
`,
...
...
googlemock/docs/v1_5/CookBook.md
View file @
0ffd8629
...
@@ -2864,6 +2864,7 @@ For example, when using an `ACTION` as a stub action for mock function:
...
@@ -2864,6 +2864,7 @@ For example, when using an `ACTION` as a stub action for mock function:
int DoSomething(bool flag, int* ptr);
int DoSomething(bool flag, int* ptr);
```
```
we have:
we have:
| **Pre-defined Symbol** | **Is Bound To** |
| **Pre-defined Symbol** | **Is Bound To** |
|:-----------------------|:----------------|
|:-----------------------|:----------------|
| `
arg0
` | the value of `
flag
` |
| `
arg0
` | the value of `
flag
` |
...
@@ -3025,6 +3026,7 @@ is asked to infer the type of `x`?
...
@@ -3025,6 +3026,7 @@ is asked to infer the type of `x`?
If you are writing a function that returns an `
ACTION
` object, you'll
If you are writing a function that returns an `
ACTION
` object, you'll
need to know its type. The type depends on the macro used to define
need to know its type. The type depends on the macro used to define
the action and the parameter types. The rule is relatively simple:
the action and the parameter types. The rule is relatively simple:
| **Given Definition** | **Expression** | **Has Type** |
| **Given Definition** | **Expression** | **Has Type** |
|:---------------------|:---------------|:-------------|
|:---------------------|:---------------|:-------------|
| `
ACTION(Foo)
` | `
Foo()
` | `
FooAction
` |
| `
ACTION(Foo)
` | `
Foo()
` | `
FooAction
` |
...
...
googlemock/docs/v1_6/CookBook.md
View file @
0ffd8629
...
@@ -3015,6 +3015,7 @@ For example, when using an `ACTION` as a stub action for mock function:
...
@@ -3015,6 +3015,7 @@ For example, when using an `ACTION` as a stub action for mock function:
int DoSomething(bool flag, int* ptr);
int DoSomething(bool flag, int* ptr);
```
```
we have:
we have:
| **Pre-defined Symbol** | **Is Bound To** |
| **Pre-defined Symbol** | **Is Bound To** |
|:-----------------------|:----------------|
|:-----------------------|:----------------|
| `
arg0
` | the value of `
flag
` |
| `
arg0
` | the value of `
flag
` |
...
@@ -3176,6 +3177,7 @@ is asked to infer the type of `x`?
...
@@ -3176,6 +3177,7 @@ is asked to infer the type of `x`?
If you are writing a function that returns an `
ACTION
` object, you'll
If you are writing a function that returns an `
ACTION
` object, you'll
need to know its type. The type depends on the macro used to define
need to know its type. The type depends on the macro used to define
the action and the parameter types. The rule is relatively simple:
the action and the parameter types. The rule is relatively simple:
| **Given Definition** | **Expression** | **Has Type** |
| **Given Definition** | **Expression** | **Has Type** |
|:---------------------|:---------------|:-------------|
|:---------------------|:---------------|:-------------|
| `
ACTION(Foo)
` | `
Foo()
` | `
FooAction
` |
| `
ACTION(Foo)
` | `
Foo()
` | `
FooAction
` |
...
...
googlemock/docs/v1_7/CookBook.md
View file @
0ffd8629
...
@@ -3105,6 +3105,7 @@ For example, when using an `ACTION` as a stub action for mock function:
...
@@ -3105,6 +3105,7 @@ For example, when using an `ACTION` as a stub action for mock function:
int DoSomething(bool flag, int* ptr);
int DoSomething(bool flag, int* ptr);
```
```
we have:
we have:
| **Pre-defined Symbol** | **Is Bound To** |
| **Pre-defined Symbol** | **Is Bound To** |
|:-----------------------|:----------------|
|:-----------------------|:----------------|
| `
arg0
` | the value of `
flag
` |
| `
arg0
` | the value of `
flag
` |
...
@@ -3266,6 +3267,7 @@ is asked to infer the type of `x`?
...
@@ -3266,6 +3267,7 @@ is asked to infer the type of `x`?
If you are writing a function that returns an `
ACTION
` object, you'll
If you are writing a function that returns an `
ACTION
` object, you'll
need to know its type. The type depends on the macro used to define
need to know its type. The type depends on the macro used to define
the action and the parameter types. The rule is relatively simple:
the action and the parameter types. The rule is relatively simple:
| **Given Definition** | **Expression** | **Has Type** |
| **Given Definition** | **Expression** | **Has Type** |
|:---------------------|:---------------|:-------------|
|:---------------------|:---------------|:-------------|
| `
ACTION(Foo)
` | `
Foo()
` | `
FooAction
` |
| `
ACTION(Foo)
` | `
Foo()
` | `
FooAction
` |
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment