mirror of
https://github.com/google/googletest.git
synced 2025-01-14 00:20:57 +08:00
Googletest export
internal change PiperOrigin-RevId: 326080000
This commit is contained in:
parent
6c655699c4
commit
10ade8473b
@ -2,6 +2,8 @@
|
||||
|
||||
<!-- GOOGLETEST_CM0019 DO NOT DELETE -->
|
||||
|
||||
<!-- GOOGLETEST_CM0035 DO NOT DELETE -->
|
||||
|
||||
<!-- GOOGLETEST_CM0033 DO NOT DELETE -->
|
||||
|
||||
## Defining a Mock Class
|
||||
|
@ -10,6 +10,8 @@ recommended to write `using ::testing::Foo;` once in your file before using the
|
||||
name `Foo` defined by gMock. We omit such `using` statements in this section for
|
||||
brevity, but you should do it in your own code.
|
||||
|
||||
<!-- GOOGLETEST_CM0035 DO NOT DELETE -->
|
||||
|
||||
## Creating Mock Classes
|
||||
|
||||
Mock classes are defined as normal classes, using the `MOCK_METHOD` macro to
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
<!-- GOOGLETEST_CM0013 DO NOT DELETE -->
|
||||
|
||||
<!-- GOOGLETEST_CM0035 DO NOT DELETE -->
|
||||
|
||||
## What Is gMock?
|
||||
|
||||
When you write a prototype or test, often it's not feasible or wise to rely on
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
<!-- GOOGLETEST_CM0021 DO NOT DELETE -->
|
||||
|
||||
<!-- GOOGLETEST_CM0035 DO NOT DELETE -->
|
||||
|
||||
### When I call a method on my mock object, the method for the real object is invoked instead. What's the problem?
|
||||
|
||||
In order for a method to be mocked, it must be *virtual*, unless you use the
|
||||
|
@ -1,5 +1,7 @@
|
||||
<b>P</b>ump is <b>U</b>seful for <b>M</b>eta <b>P</b>rogramming.
|
||||
|
||||
<!-- GOOGLETEST_CM0035 DO NOT DELETE -->
|
||||
|
||||
# The Problem
|
||||
|
||||
Template and macro libraries often need to define many classes, functions, or
|
||||
|
Loading…
x
Reference in New Issue
Block a user