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
15756aa0
Commit
15756aa0
authored
Jul 18, 2019
by
Gennadiy Civil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Manual docs tweaks still in preparation for including docs with code pushes
parent
34ddfff9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
cheat_sheet.md
googlemock/docs/cheat_sheet.md
+0
-0
cook_book.md
googlemock/docs/cook_book.md
+2
-2
for_dummies.md
googlemock/docs/for_dummies.md
+1
-1
faq.md
googletest/docs/faq.md
+1
-1
No files found.
googlemock/docs/cheat_sheet.md
View file @
15756aa0
This diff is collapsed.
Click to expand it.
googlemock/docs/cook_book.md
View file @
15756aa0
...
...
@@ -154,7 +154,7 @@ class MockStack : public StackInterface<Elem> {
#### Mocking Non-virtual Methods {#MockingNonVirtualMethods}
gMock can mock non-virtual functions to be used in Hi-perf dependency
injection.
<!-- GOOGLETEST_CM001
6
DO NOT DELETE -->
.
injection.
<!-- GOOGLETEST_CM001
7
DO NOT DELETE -->
.
In this case, instead of sharing a common base class with the real class, your
mock class will be
*unrelated*
to the real class, but contain methods with the
...
...
@@ -1455,7 +1455,7 @@ mock object and gMock.
#### Knowing When to Expect {#UseOnCall}
<!-- GOOGLETEST_CM001
7
DO NOT DELETE -->
<!-- GOOGLETEST_CM001
8
DO NOT DELETE -->
**`ON_CALL`**
is likely the
*single most under-utilized construct*
in gMock.
...
...
googlemock/docs/for_dummies.md
View file @
15756aa0
...
...
@@ -499,7 +499,7 @@ always return 100 as `n++` is only evaluated once. Similarly, `Return(new Foo)`
will create a new
`Foo`
object when the
`EXPECT_CALL()`
is executed, and will
return the same pointer every time. If you want the side effect to happen every
time, you need to define a custom action, which we'll teach in the
[
cook book
](
http://
<!-- GOOGLETEST_CM001
1
DO NOT DELETE -->
).
[
cook book
](
http://
<!-- GOOGLETEST_CM001
2
DO NOT DELETE -->
).
Time for another quiz! What do you think the following means?
...
...
googletest/docs/faq.md
View file @
15756aa0
...
...
@@ -332,7 +332,7 @@ You may still want to use `SetUp()/TearDown()` in the following cases:
*
In the body of a constructor (or destructor), it's not possible to use the
`ASSERT_xx`
macros. Therefore, if the set-up operation could cause a fatal
test failure that should prevent the test from running, it's necessary to
use
`abort`
<!-- GOOGLETEST_CM001
4
DO NOT DELETE -->
and abort the whole test executable,
use
`abort`
<!-- GOOGLETEST_CM001
5
DO NOT DELETE -->
and abort the whole test executable,
or to use
`SetUp()`
instead of a constructor.
*
If the tear-down operation could throw an exception, you must use
`TearDown()`
as opposed to the destructor, as throwing in a destructor leads
...
...
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