summaryrefslogtreecommitdiffstats
path: root/googlemock/docs
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2020-06-15 17:15:38 (GMT)
committerAndy Getz <durandal@google.com>2020-06-15 20:56:42 (GMT)
commit549c5d061e3c5ea4acffb43c92b048dd16812805 (patch)
treec66d3a4956daac34ac5d932f790d2c2246cc0dcf /googlemock/docs
parent8567b09290fe402cf01923e2131c5635b8ed851b (diff)
downloadgoogletest-549c5d061e3c5ea4acffb43c92b048dd16812805.zip
googletest-549c5d061e3c5ea4acffb43c92b048dd16812805.tar.gz
googletest-549c5d061e3c5ea4acffb43c92b048dd16812805.tar.bz2
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 bffbb3c..9550d91 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