summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authortheidexisted <invalid_ms_user@live.com>2021-08-19 08:35:14 (GMT)
committerGitHub <noreply@github.com>2021-08-19 08:35:14 (GMT)
commit088e6ed9a8ead32aeb0c340931465e0036b2eb9f (patch)
tree690c946f683da7a4c9434100361cf25a8e983fe8 /docs
parent0134d73a4902574269ff2e42827f7573d3df08ae (diff)
downloadgoogletest-088e6ed9a8ead32aeb0c340931465e0036b2eb9f.zip
googletest-088e6ed9a8ead32aeb0c340931465e0036b2eb9f.tar.gz
googletest-088e6ed9a8ead32aeb0c340931465e0036b2eb9f.tar.bz2
Simplify example code with c++11refs/pull/3531/head
Diffstat (limited to 'docs')
-rw-r--r--docs/gmock_cook_book.md5
1 files changed, 1 insertions, 4 deletions
diff --git a/docs/gmock_cook_book.md b/docs/gmock_cook_book.md
index 900bcd1..baeeb59 100644
--- a/docs/gmock_cook_book.md
+++ b/docs/gmock_cook_book.md
@@ -2033,10 +2033,7 @@ class MockRolodex : public Rolodex {
}
...
MockRolodex rolodex;
- vector<string> names;
- names.push_back("George");
- names.push_back("John");
- names.push_back("Thomas");
+ vector<string> names = {"George", "John", "Thomas"};
EXPECT_CALL(rolodex, GetNames(_))
.WillOnce(SetArrayArgument<0>(names.begin(), names.end()));
```