commit | 088e6ed9a8ead32aeb0c340931465e0036b2eb9f | [log] [tgz] |
---|---|---|
author | theidexisted <invalid_ms_user@live.com> | Thu Aug 19 16:35:14 2021 +0800 |
committer | GitHub <noreply@github.com> | Thu Aug 19 16:35:14 2021 +0800 |
tree | 690c946f683da7a4c9434100361cf25a8e983fe8 | |
parent | 0134d73a4902574269ff2e42827f7573d3df08ae [diff] |
Simplify example code with c++11
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 @@ } ... 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())); ```