summaryrefslogtreecommitdiff
path: root/googlemock/docs
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2020-06-15 13:15:38 -0400
committerAndy Getz <durandal@google.com>2020-06-15 16:56:42 -0400
commit549c5d061e3c5ea4acffb43c92b048dd16812805 (patch)
treec66d3a4956daac34ac5d932f790d2c2246cc0dcf /googlemock/docs
parent8567b09290fe402cf01923e2131c5635b8ed851b (diff)
downloadgoogletest-git-549c5d061e3c5ea4acffb43c92b048dd16812805.tar.gz
Googletest export
gMock Cookbook: Fix incorrect comment about EXPECT priority order It's actually the last matching expectation that's used, not the first. PiperOrigin-RevId: 316490770
Diffstat (limited to 'googlemock/docs')
-rw-r--r--googlemock/docs/cook_book.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/googlemock/docs/cook_book.md b/googlemock/docs/cook_book.md
index bffbb3c0..9550d912 100644
--- a/googlemock/docs/cook_book.md
+++ b/googlemock/docs/cook_book.md
@@ -1675,11 +1675,11 @@ times from calling it with the wrong arguments.
### Expecting Ordered Calls {#OrderedCalls}
-Although an `EXPECT_CALL()` statement defined earlier takes precedence when
-gMock tries to match a function call with an expectation, by default calls don't
-have to happen in the order `EXPECT_CALL()` statements are written. For example,
-if the arguments match the matchers in the third `EXPECT_CALL()`, but not those
-in the first two, then the third expectation will be used.
+Although an `EXPECT_CALL()` statement defined later takes precedence when gMock
+tries to match a function call with an expectation, by default calls don't have
+to happen in the order `EXPECT_CALL()` statements are written. For example, if
+the arguments match the matchers in the second `EXPECT_CALL()`, but not those in
+the first and third, then the second expectation will be used.
If you would rather have all calls occur in the order of the expectations, put
the `EXPECT_CALL()` statements in a block where you define a variable of type