Use GTEST_DISABLE_MSC_WARNINGS macros to disable warnings
Prior to this change we had a mixture of pragmas and GTEST_DISABLE_MSC_WARNINGS; this change consolidates all instances to use the macros. PiperOrigin-RevId: 505786926 Change-Id: I2be8f6304387393995081af42ed32c2ad1bba5a7
This commit is contained in:
committed by
Copybara-Service
parent
f1c05d4544
commit
4fb7039fda
@@ -31,13 +31,11 @@
|
||||
//
|
||||
// This file tests some commonly used argument matchers.
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
// Silence warning C4244: 'initializing': conversion from 'int' to 'short',
|
||||
// possible loss of data and C4100, unreferenced local parameter
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4244)
|
||||
#pragma warning(disable : 4100)
|
||||
#endif
|
||||
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4244 4100)
|
||||
|
||||
#include "test/gmock-matchers_test.h"
|
||||
|
||||
@@ -1814,6 +1812,4 @@ TEST(ThrowsPredicateCompilesTest, MessageMatcherAcceptsNonMatcher) {
|
||||
} // namespace gmock_matchers_test
|
||||
} // namespace testing
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
GTEST_DISABLE_MSC_WARNINGS_POP_() // 4244 4100
|
||||
|
||||
Reference in New Issue
Block a user