aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2024-02-13 13:54:14 -0800
committerCopybara-Service <copybara-worker@google.com>2024-02-13 13:55:04 -0800
commit6eb225cb8823c254d3a64549f2e1efad05c01757 (patch)
tree08c7a054b975ac10e2f6640c53dd4a3965332f00 /docs
parentb75ecf1bed2fcd416b66c86cb6fe79122abf132e (diff)
downloadgoogletest-6eb225cb8823c254d3a64549f2e1efad05c01757.zip
googletest-6eb225cb8823c254d3a64549f2e1efad05c01757.tar.gz
googletest-6eb225cb8823c254d3a64549f2e1efad05c01757.tar.bz2
Add anchor for expectation ordering note
PiperOrigin-RevId: 606736565 Change-Id: Ifad0b34e1deeec1374377d733375c6210896d0d3
Diffstat (limited to 'docs')
-rw-r--r--docs/gmock_for_dummies.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/gmock_for_dummies.md b/docs/gmock_for_dummies.md
index 9f24dca..ed2297c 100644
--- a/docs/gmock_for_dummies.md
+++ b/docs/gmock_for_dummies.md
@@ -261,6 +261,8 @@ happen. Therefore it's a good idea to turn on the heap checker in your tests
when you allocate mocks on the heap. You get that automatically if you use the
`gtest_main` library already.
+###### Expectation Ordering
+
**Important note:** gMock requires expectations to be set **before** the mock
functions are called, otherwise the behavior is **undefined**. Do not alternate
between calls to `EXPECT_CALL()` and calls to the mock functions, and do not set