Googletest export

Introduce a new `Address` matcher to gmock.

PiperOrigin-RevId: 346344591
This commit is contained in:
Abseil Team
2020-12-08 12:37:32 -05:00
committed by Andy Getz
parent 8779937dd0
commit e5644f5f12
3 changed files with 92 additions and 0 deletions

View File

@@ -420,6 +420,7 @@ messages, you can use:
<!-- mdformat off(no multiline tables) -->
| Matcher | Description |
| :------------------------ | :---------------------------------------------- |
| `Address(m)` | the result of `std::addressof(argument)` matches `m`. |
| `Pointee(m)` | `argument` (either a smart pointer or a raw pointer) points to a value that matches matcher `m`. |
| `Pointer(m)` | `argument` (either a smart pointer or a raw pointer) contains a pointer that matches `m`. `m` will match against the raw pointer regardless of the type of `argument`. |
| `WhenDynamicCastTo<T>(m)` | when `argument` is passed through `dynamic_cast<T>()`, it matches matcher `m`. |