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
51d92b2c
Commit
51d92b2c
authored
Feb 06, 2017
by
Dawid Kurek
Committed by
GitHub
Feb 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace html entities with their equivalents
parent
d62d6c65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
CookBook.md
googlemock/docs/CookBook.md
+2
-2
No files found.
googlemock/docs/CookBook.md
View file @
51d92b2c
...
@@ -2365,7 +2365,7 @@ Now there’s one topic we haven’t covered: how do you set expectations on `Sh
...
@@ -2365,7 +2365,7 @@ Now there’s one topic we haven’t covered: how do you set expectations on `Sh
// When one calls ShareBuzz() on the MockBuzzer like this, the call is
// When one calls ShareBuzz() on the MockBuzzer like this, the call is
// forwarded to DoShareBuzz(), which is mocked. Therefore this statement
// forwarded to DoShareBuzz(), which is mocked. Therefore this statement
// will trigger the above EXPECT_CALL.
// will trigger the above EXPECT_CALL.
mock_buzzer_.ShareBuzz(MakeUnique
<Buzz>
(AccessLevel::kInternal),
mock_buzzer_.ShareBuzz(MakeUnique
<Buzz>
(AccessLevel::kInternal),
::base::Now());
::base::Now());
```
```
...
@@ -2404,7 +2404,7 @@ Now, the mock `DoShareBuzz()` method is free to save the buzz argument for later
...
@@ -2404,7 +2404,7 @@ Now, the mock `DoShareBuzz()` method is free to save the buzz argument for later
```
```
std::unique_ptr<Buzz> intercepted_buzz;
std::unique_ptr<Buzz> intercepted_buzz;
EXPECT_CALL(mock_buzzer_, DoShareBuzz(NotNull(), _))
EXPECT_CALL(mock_buzzer_, DoShareBuzz(NotNull(), _))
.WillOnce(Invoke([&
amp;
intercepted_buzz](Buzz* buzz, Time timestamp) {
.WillOnce(Invoke([&intercepted_buzz](Buzz* buzz, Time timestamp) {
// Save buzz in intercepted_buzz for analysis later.
// Save buzz in intercepted_buzz for analysis later.
intercepted_buzz.reset(buzz);
intercepted_buzz.reset(buzz);
return false;
return false;
...
...
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