aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--googlemock/test/gmock-generated-actions_test.cc7
-rw-r--r--googlemock/test/gmock-more-actions_test.cc7
2 files changed, 9 insertions, 5 deletions
diff --git a/googlemock/test/gmock-generated-actions_test.cc b/googlemock/test/gmock-generated-actions_test.cc
index c2d2a0a8..5ca5bc78 100644
--- a/googlemock/test/gmock-generated-actions_test.cc
+++ b/googlemock/test/gmock-generated-actions_test.cc
@@ -376,7 +376,8 @@ class SubstractAction : public ActionInterface<int(int, int)> { // NOLINT
TEST(WithArgsTest, NonInvokeAction) {
Action<int(const string&, int, int)> a = // NOLINT
WithArgs<2, 1>(MakeAction(new SubstractAction));
- EXPECT_EQ(8, a.Perform(make_tuple(string("hi"), 2, 10)));
+ string s("hello");
+ EXPECT_EQ(8, a.Perform(tuple<const string&, int, int>(s, 2, 10)));
}
// Tests using WithArgs to pass all original arguments in the original order.
@@ -753,7 +754,7 @@ TEST(ActionPMacroTest, CanReferenceArgumentAndParameterTypes) {
TEST(ActionPMacroTest, WorksInCompatibleMockFunction) {
Action<std::string(const std::string& s)> a1 = Plus("tail");
const std::string re = "re";
- EXPECT_EQ("retail", a1.Perform(make_tuple(re)));
+ EXPECT_EQ("retail", a1.Perform(tuple<const std::string&>(re)));
}
// Tests that we can use ACTION*() to define actions overloaded on the
@@ -795,7 +796,7 @@ TEST(ActionPnMacroTest, WorksFor3Parameters) {
Action<std::string(const std::string& s)> a2 = Plus("tail", "-", ">");
const std::string re = "re";
- EXPECT_EQ("retail->", a2.Perform(make_tuple(re)));
+ EXPECT_EQ("retail->", a2.Perform(tuple<const std::string&>(re)));
}
ACTION_P4(Plus, p0, p1, p2, p3) { return arg0 + p0 + p1 + p2 + p3; }
diff --git a/googlemock/test/gmock-more-actions_test.cc b/googlemock/test/gmock-more-actions_test.cc
index 9477fe9f..77e15bd5 100644
--- a/googlemock/test/gmock-more-actions_test.cc
+++ b/googlemock/test/gmock-more-actions_test.cc
@@ -327,7 +327,9 @@ TEST(InvokeTest, FunctionThatTakes10Arguments) {
TEST(InvokeTest, FunctionWithUnusedParameters) {
Action<int(int, int, double, const string&)> a1 =
Invoke(SumOfFirst2);
- EXPECT_EQ(12, a1.Perform(make_tuple(10, 2, 5.6, string("hi"))));
+ string s("hi");
+ EXPECT_EQ(12, a1.Perform(
+ tuple<int, int, double, const string&>(10, 2, 5.6, s)));
Action<int(int, int, bool, int*)> a2 =
Invoke(SumOfFirst2);
@@ -379,7 +381,8 @@ TEST(InvokeMethodTest, Binary) {
Foo foo;
Action<string(const string&, char)> a = Invoke(&foo, &Foo::Binary);
string s("Hell");
- EXPECT_EQ("Hello", a.Perform(make_tuple(s, 'o')));
+ EXPECT_EQ("Hello", a.Perform(
+ tuple<const string&, char>(s, 'o')));
}
// Tests using Invoke() with a ternary method.