Add anchor for expectation ordering note

PiperOrigin-RevId: 606736565
Change-Id: Ifad0b34e1deeec1374377d733375c6210896d0d3
This commit is contained in:
Abseil Team 2024-02-13 13:54:14 -08:00 committed by Copybara-Service
parent b75ecf1bed
commit 6eb225cb88

View File

@ -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 when you allocate mocks on the heap. You get that automatically if you use the
`gtest_main` library already. `gtest_main` library already.
###### Expectation Ordering
**Important note:** gMock requires expectations to be set **before** the mock **Important note:** gMock requires expectations to be set **before** the mock
functions are called, otherwise the behavior is **undefined**. Do not alternate 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 between calls to `EXPECT_CALL()` and calls to the mock functions, and do not set