aboutsummaryrefslogtreecommitdiff
path: root/docs/gmock_cook_book.md
diff options
context:
space:
mode:
authorDenis Hananein <i@zloylos.me>2022-11-20 15:08:43 +0100
committerDenis Hananein <i@zloylos.me>2022-11-20 15:08:43 +0100
commit834698cc9b19fc6e327db1b8b7e434e18b5cef38 (patch)
tree6d6572bf71dc50bad8cae07f166df11320a46961 /docs/gmock_cook_book.md
parent9c332145b71c36a5bad9688312c79184f98601ff (diff)
downloadgoogletest-834698cc9b19fc6e327db1b8b7e434e18b5cef38.zip
googletest-834698cc9b19fc6e327db1b8b7e434e18b5cef38.tar.gz
googletest-834698cc9b19fc6e327db1b8b7e434e18b5cef38.tar.bz2
Change MakeUnique -> std::make_unique in docs
Diffstat (limited to 'docs/gmock_cook_book.md')
-rw-r--r--docs/gmock_cook_book.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/gmock_cook_book.md b/docs/gmock_cook_book.md
index 5be298d..693201e 100644
--- a/docs/gmock_cook_book.md
+++ b/docs/gmock_cook_book.md
@@ -2784,7 +2784,7 @@ If you just need to return a pre-defined move-only value, you can use the
// When this fires, the unique_ptr<> specified by ByMove(...) will
// be returned.
EXPECT_CALL(mock_buzzer_, MakeBuzz("world"))
- .WillOnce(Return(ByMove(MakeUnique<Buzz>(AccessLevel::kInternal))));
+ .WillOnce(Return(ByMove(std::make_unique<Buzz>(AccessLevel::kInternal))));
EXPECT_NE(nullptr, mock_buzzer_.MakeBuzz("world"));
```
@@ -2805,7 +2805,7 @@ pretty much anything you want:
```cpp
EXPECT_CALL(mock_buzzer_, MakeBuzz("x"))
.WillRepeatedly([](StringPiece text) {
- return MakeUnique<Buzz>(AccessLevel::kInternal);
+ return std::make_unique<Buzz>(AccessLevel::kInternal);
});
EXPECT_NE(nullptr, mock_buzzer_.MakeBuzz("x"));
@@ -2824,7 +2824,7 @@ can always use `Return`, or a [lambda or functor](#FunctionsAsActions):
using ::testing::Unused;
EXPECT_CALL(mock_buzzer_, ShareBuzz(NotNull(), _)).WillOnce(Return(true));
- EXPECT_TRUE(mock_buzzer_.ShareBuzz(MakeUnique<Buzz>(AccessLevel::kInternal)),
+ EXPECT_TRUE(mock_buzzer_.ShareBuzz(std::make_unique<Buzz>(AccessLevel::kInternal)),
0);
EXPECT_CALL(mock_buzzer_, ShareBuzz(_, _)).WillOnce(
@@ -2868,7 +2868,7 @@ method:
// When one calls ShareBuzz() on the MockBuzzer like this, the call is
// forwarded to DoShareBuzz(), which is mocked. Therefore this statement
// will trigger the above EXPECT_CALL.
- mock_buzzer_.ShareBuzz(MakeUnique<Buzz>(AccessLevel::kInternal), 0);
+ mock_buzzer_.ShareBuzz(std::make_unique<Buzz>(AccessLevel::kInternal), 0);
```
### Making the Compilation Faster