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
f20797bd
Commit
f20797bd
authored
Jul 01, 2017
by
Carlos O'Ryan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Same fixes for "current" version.
parent
1dde1eed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
CookBook.md
googlemock/docs/CookBook.md
+5
-4
No files found.
googlemock/docs/CookBook.md
View file @
f20797bd
...
@@ -1029,9 +1029,10 @@ a value that satisfies matcher `m`.
...
@@ -1029,9 +1029,10 @@ a value that satisfies matcher `m`.
For example:
For example:
> | `Field(&Foo::number, Ge(3))` | Matches `x` where `x.number >= 3`.
|
| Expression | Description
|
|:-----------------------------|:-----------------------------------|
|:-----------------------------|:-----------------------------------|
> | `Property(&Foo::name, StartsWith("John "))` | Matches `x` where `x.name()` starts with `"John "`. |
|
`Field(&Foo::number, Ge(3))`
| Matches
`x`
where
`x.number >= 3`
. |
|
`Property(&Foo::name, StartsWith("John "))`
| Matches
`x`
where
`x.name()`
starts with
`"John "`
. |
Note that in
`Property(&Foo::baz, ...)`
, method
`baz()`
must take no
Note that in
`Property(&Foo::baz, ...)`
, method
`baz()`
must take no
argument and be declared as
`const`
.
argument and be declared as
`const`
.
...
@@ -2482,12 +2483,12 @@ MockFoo::~MockFoo() {}
...
@@ -2482,12 +2483,12 @@ MockFoo::~MockFoo() {}
## Forcing a Verification ##
## Forcing a Verification ##
When it's being destoyed, your friendly mock object will automatically
When it's being dest
r
oyed, your friendly mock object will automatically
verify that all expectations on it have been satisfied, and will
verify that all expectations on it have been satisfied, and will
generate
[
Google Test
](
../../googletest/
)
failures
generate
[
Google Test
](
../../googletest/
)
failures
if not. This is convenient as it leaves you with one less thing to
if not. This is convenient as it leaves you with one less thing to
worry about. That is, unless you are not sure if your mock object will
worry about. That is, unless you are not sure if your mock object will
be destoyed.
be dest
r
oyed.
How could it be that your mock object won't eventually be destroyed?
How could it be that your mock object won't eventually be destroyed?
Well, it might be created on the heap and owned by the code you are
Well, it might be created on the heap and owned by the code you are
...
...
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