diff options
Diffstat (limited to 'googlemock')
-rw-r--r-- | googlemock/docs/CheatSheet.md | 1 | ||||
-rw-r--r-- | googlemock/include/gmock/gmock-spec-builders.h | 2 | ||||
-rw-r--r-- | googlemock/test/gmock-matchers_test.cc | 2 |
3 files changed, 2 insertions, 3 deletions
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<T>(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<type>(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.| diff --git a/googlemock/include/gmock/gmock-spec-builders.h b/googlemock/include/gmock/gmock-spec-builders.h index c0df5ccb..e58adfcb 100644 --- a/googlemock/include/gmock/gmock-spec-builders.h +++ b/googlemock/include/gmock/gmock-spec-builders.h @@ -1598,7 +1598,7 @@ class FunctionMockerBase : public UntypedFunctionMockerBase { // const_cast is required since in C++98 we still pass ArgumentTuple around // by const& instead of rvalue reference. void* untyped_args = const_cast<void*>(static_cast<const void*>(&args)); - scoped_ptr<ResultHolder> holder( + std::unique_ptr<ResultHolder> holder( DownCast_<ResultHolder*>(this->UntypedInvokeWith(untyped_args))); return holder->Unwrap(); } diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index 6f042489..347c2c7b 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -145,10 +145,8 @@ using testing::internal::FormatMatcherDescription; using testing::internal::IsReadableTypeName; using testing::internal::MatchMatrix; using testing::internal::RE; -using testing::internal::scoped_ptr; using testing::internal::StreamMatchResultListener; using testing::internal::Strings; -using testing::internal::scoped_ptr; using testing::internal::string; // For testing ExplainMatchResultTo(). |