Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Googletest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Meng
Googletest
Commits
64660396
Commit
64660396
authored
4 years ago
by
Derek Mauro
Browse files
Options
Downloads
Plain Diff
Merge pull request #2994 from xerus2000:gmock-docs
PiperOrigin-RevId: 330545489
parents
5f8fcf4a
296c9d29
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
googlemock/docs/cook_book.md
+6
-4
6 additions, 4 deletions
googlemock/docs/cook_book.md
with
6 additions
and
4 deletions
googlemock/docs/cook_book.md
+
6
−
4
View file @
64660396
...
...
@@ -3,7 +3,7 @@
<!-- GOOGLETEST_CM0012 DO NOT DELETE -->
You can find recipes for using gMock here. If you haven't yet, please read
[
th
is
](
for_dummies.md
)
first to make sure you understand the basics.
[
th
e dummy guide
](
for_dummies.md
)
first to make sure you understand the basics.
**Note:**
gMock lives in the
`testing`
name space. For readability, it is
recommended to write
`using ::testing::Foo;`
once in your file before using the
...
...
@@ -283,9 +283,11 @@ recipe for [mocking non-virtual methods](#MockingNonVirtualMethods).
### Old-Style `MOCK_METHODn` Macros
Before the generic
`MOCK_METHOD`
macro was introduced, mocks where created using
a family of macros collectively called
`MOCK_METHODn`
. These macros are still
supported, though migration to the new
`MOCK_METHOD`
is recommended.
Before the generic
`MOCK_METHOD`
macro
[
was introduced in 2018
](
https://github.com/google/googletest/commit/c5f08bf91944ce1b19bcf414fa1760e69d20afc2
)
,
mocks where created using a family of macros collectively called
`MOCK_METHODn`
.
These macros are still supported, though migration to the new
`MOCK_METHOD`
is
recommended.
The macros in the
`MOCK_METHODn`
family differ from
`MOCK_METHOD`
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment