diff options
author | Gennadiy Civil <misterg@google.com> | 2018-04-10 15:57:16 -0400 |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-04-10 15:57:16 -0400 |
commit | e1071eb9497304a38e69737e90a88b4877b8b736 (patch) | |
tree | a3f997e6412a22622588cb7e7468920678774054 /googlemock/test | |
parent | d0de1180e44bb279361ebe3ce9ba3d860bdad4b2 (diff) | |
download | googletest-e1071eb9497304a38e69737e90a88b4877b8b736.tar.gz googletest-e1071eb9497304a38e69737e90a88b4877b8b736.tar.bz2 googletest-e1071eb9497304a38e69737e90a88b4877b8b736.zip |
RE-Doing the merge, this time with gcc on mac in the PR so I can catch errors before merging the PR
Diffstat (limited to 'googlemock/test')
-rw-r--r-- | googlemock/test/gmock-actions_test.cc | 16 | ||||
-rw-r--r-- | googlemock/test/gmock-generated-actions_test.cc | 11 | ||||
-rw-r--r-- | googlemock/test/gmock_output_test_.cc | 4 |
3 files changed, 22 insertions, 9 deletions
diff --git a/googlemock/test/gmock-actions_test.cc b/googlemock/test/gmock-actions_test.cc index ea6129d7..5dd48460 100644 --- a/googlemock/test/gmock-actions_test.cc +++ b/googlemock/test/gmock-actions_test.cc @@ -33,6 +33,15 @@ // // This file tests the built-in actions. +// Silence C4800 (C4800: 'int *const ': forcing value +// to bool 'true' or 'false') for MSVC 14,15 +#ifdef _MSC_VER +#if _MSC_VER <= 1900 +# pragma warning(push) +# pragma warning(disable:4800) +#endif +#endif + #include "gmock/gmock-actions.h" #include <algorithm> #include <iterator> @@ -1556,3 +1565,10 @@ TEST(MoveOnlyArgumentsTest, ReturningActions) { #endif // GTEST_LANG_CXX11 } // Unnamed namespace + +#ifdef _MSC_VER +#if _MSC_VER == 1900 +# pragma warning(pop) +#endif +#endif + diff --git a/googlemock/test/gmock-generated-actions_test.cc b/googlemock/test/gmock-generated-actions_test.cc index 80bcb31c..b821e5a2 100644 --- a/googlemock/test/gmock-generated-actions_test.cc +++ b/googlemock/test/gmock-generated-actions_test.cc @@ -374,10 +374,9 @@ class SubstractAction : public ActionInterface<int(int, int)> { // NOLINT }; TEST(WithArgsTest, NonInvokeAction) { - Action<int(const string&, int, int)> a = // NOLINT + Action<int(const std::string&, int, int)> a = // NOLINT WithArgs<2, 1>(MakeAction(new SubstractAction)); - string s("hello"); - EXPECT_EQ(8, a.Perform(tuple<const string&, int, int>(s, 2, 10))); + EXPECT_EQ(8, a.Perform(make_tuple(std::string("hi"), 2, 10))); } // Tests using WithArgs to pass all original arguments in the original order. @@ -754,7 +753,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(tuple<const std::string&>(re))); + EXPECT_EQ("retail", a1.Perform(make_tuple(re))); } // Tests that we can use ACTION*() to define actions overloaded on the @@ -796,7 +795,7 @@ TEST(ActionPnMacroTest, WorksFor3Parameters) { Action<std::string(const std::string& s)> a2 = Plus("tail", "-", ">"); const std::string re = "re"; - EXPECT_EQ("retail->", a2.Perform(tuple<const std::string&>(re))); + EXPECT_EQ("retail->", a2.Perform(make_tuple(re))); } ACTION_P4(Plus, p0, p1, p2, p3) { return arg0 + p0 + p1 + p2 + p3; } @@ -1120,7 +1119,7 @@ TEST(ActionTemplateTest, WorksForIntegralTemplateParams) { EXPECT_FALSE(b); // Verifies that resetter is deleted. } -// Tests that ACTION_TEMPLATE works for a template with template parameters. +// Tests that ACTION_TEMPLATES works for template template parameters. ACTION_TEMPLATE(ReturnSmartPointer, HAS_1_TEMPLATE_PARAMS(template <typename Pointee> class, Pointer), diff --git a/googlemock/test/gmock_output_test_.cc b/googlemock/test/gmock_output_test_.cc index d5f909d9..1b59eb3f 100644 --- a/googlemock/test/gmock_output_test_.cc +++ b/googlemock/test/gmock_output_test_.cc @@ -39,14 +39,12 @@ #include "gtest/gtest.h" - -// Silence C4100 (unreferenced formal parameter) for MSVC +// Silence C4100 (unreferenced formal parameter) #ifdef _MSC_VER # pragma warning(push) # pragma warning(disable:4100) #endif - using testing::_; using testing::AnyNumber; using testing::Ge; |