Skip to content

Commit

Permalink
Add anchor for expectation ordering note
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 606736565
Change-Id: Ifad0b34e1deeec1374377d733375c6210896d0d3
  • Loading branch information
Abseil Team authored and copybara-github committed Feb 13, 2024
1 parent b75ecf1 commit 6eb225c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/gmock_for_dummies.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6eb225c

Please sign in to comment.