diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index 72dff85c..de02929b 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -33,6 +33,13 @@ // // This file tests some commonly used argument matchers. +// Disable MSVC2015 warning for std::pair: +// "decorated name length exceeded, name was truncated". +#if defined _MSC_VER +# pragma warning(push) +# pragma warning(disable:4503) +#endif + #include "gmock/gmock-matchers.h" #include "gmock/gmock-more-matchers.h" @@ -59,13 +66,6 @@ # include // NOLINT #endif -// Disable MSVC2015 warning for std::pair: -// "decorated name length exceeded, name was truncated". -#if defined _MSC_VER -# pragma warning(push) -# pragma warning(disable:4503) -#endif - #if GTEST_LANG_CXX11 # include #endif