Add example using EXPECT statement in custom matcher
commit2954cb8d879886403d55343f941ae7d0216e0f6b
authorAbseil Team <absl-team@google.com>
Thu, 2 May 2024 23:06:19 +0000 (2 16:06 -0700)
committerCopybara-Service <copybara-worker@google.com>
Thu, 2 May 2024 23:07:12 +0000 (2 16:07 -0700)
tree73453001e2f84688177e23a70396c0824bc11e8e
parentd83fee138a9ae6cb7c03688a2d08d4043a39815d
Add example using EXPECT statement in custom matcher

`EXPECT_...` statements can be used inside matcher definitions – this is an important option that is glossed over in this documentation. Users should definitely be aware of this option, since writing custom messages to the `result_listener` can be very cumbersome (and unnecessary) sometimes.

This change adds a relevant example and includes the associated error message it provides on failure.

PiperOrigin-RevId: 630206661
Change-Id: Idee00ba77ce3c1245597aa082f9cd0efff16aceb
docs/gmock_cook_book.md