From 39de88cb9cd43c46330bf20726e00e9b211f6ce9 Mon Sep 17 00:00:00 2001 From: Alex Konradi Date: Mon, 29 Oct 2018 17:18:07 -0400 Subject: [PATCH] Add Optional() to the cheat sheet doc. The Optional() matcher is otherwise undocumented except in the source. This patch adds it to the cheat sheet for better visibility. --- googlemock/docs/CheatSheet.md | 1 + 1 file changed, 1 insertion(+) diff --git a/googlemock/docs/CheatSheet.md b/googlemock/docs/CheatSheet.md index d5757b23..bc2af11f 100644 --- a/googlemock/docs/CheatSheet.md +++ b/googlemock/docs/CheatSheet.md @@ -181,6 +181,7 @@ divided into several categories: |`Ne(value)` |`argument != value`| |`IsNull()` |`argument` is a `NULL` pointer (raw or smart).| |`NotNull()` |`argument` is a non-null pointer (raw or smart).| +|`Optional(m)` |`argument` is `optional<>` that contains a value matching `m`.| |`VariantWith(m)` |`argument` is `variant<>` that holds the alternative of type T with a value matching `m`.| |`Ref(variable)` |`argument` is a reference to `variable`.| |`TypedEq(value)`|`argument` has type `type` and is equal to `value`. You may need to use this instead of `Eq(value)` when the mock function is overloaded.|