diff options
Diffstat (limited to 'googlemock/docs/for_dummies.md')
-rw-r--r-- | googlemock/docs/for_dummies.md | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/googlemock/docs/for_dummies.md b/googlemock/docs/for_dummies.md index b75c9a09..5551cd8b 100644 --- a/googlemock/docs/for_dummies.md +++ b/googlemock/docs/for_dummies.md @@ -1,6 +1,6 @@ -## Googletest Mocking (gMock) for Dummies {#GMockForDummies} +## gMock for Dummies {#GMockForDummies} -<!-- GOOGLETEST_CM0012 DO NOT DELETE --> +<!-- GOOGLETEST_CM0013 DO NOT DELETE --> ### What Is gMock? @@ -206,6 +206,8 @@ choosing the adaptor interface can make your code easier to write and more readable (a net win in the long run), as you can choose `FooAdaptor` to fit your specific domain much better than `Foo` does. +<!-- GOOGLETEST_CM0029 DO NOT DELETE --> + ### Using Mocks in Tests Once you have a mock class, using it is easy. The typical work flow is: @@ -499,7 +501,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_CM0011 DO NOT DELETE -->). +[cook book](http://<!-- GOOGLETEST_CM0012 DO NOT DELETE -->). Time for another quiz! What do you think the following means? @@ -593,8 +595,8 @@ In this example, we test that `Foo()` calls the three expected functions in the order as written. If a call is made out-of-order, it will be an error. (What if you care about the relative order of some of the calls, but not all of -them? Can you specify an arbitrary partial order? The answer is ... yes! If you -are impatient, the details can be found [here](#PartialOrder).) +them? Can you specify an arbitrary partial order? The answer is ... yes! The +details can be found [here](cook_book.md#OrderedCalls).) #### All Expectations Are Sticky (Unless Said Otherwise) {#StickyExpectations} |