Unverified Commit 088e6ed9 authored by theidexisted's avatar theidexisted Committed by GitHub
Browse files

Simplify example code with c++11

parent 0134d73a
...@@ -2033,10 +2033,7 @@ class MockRolodex : public Rolodex { ...@@ -2033,10 +2033,7 @@ class MockRolodex : public Rolodex {
} }
... ...
MockRolodex rolodex; MockRolodex rolodex;
vector<string> names; vector<string> names = {"George", "John", "Thomas"};
names.push_back("George");
names.push_back("John");
names.push_back("Thomas");
EXPECT_CALL(rolodex, GetNames(_)) EXPECT_CALL(rolodex, GetNames(_))
.WillOnce(SetArrayArgument<0>(names.begin(), names.end())); .WillOnce(SetArrayArgument<0>(names.begin(), names.end()));
``` ```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment