Merge pull request #1562 from gennadiycivil/master

small cleanup
This commit is contained in:
Gennadiy Civil 2018-04-12 11:45:40 -04:00 committed by GitHub
commit 531e29485c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 2 deletions

View File

@ -46,8 +46,11 @@ namespace testing {
// Silence C4100 (unreferenced formal
// parameter) for MSVC
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable:4100)
#if (_MSC_VER == 1900)
// and silence C4800 (C4800: 'int *const ': forcing value
// to bool 'true' or 'false') for MSVC 14
# pragma warning(disable:4800)
#endif
#endif
@ -78,6 +81,11 @@ MATCHER(IsFalse, negation ? "is true" : "is false") {
return !static_cast<bool>(arg);
}
#ifdef _MSC_VER
# pragma warning(pop)
#endif
} // namespace testing
#endif // GMOCK_GMOCK_MORE_MATCHERS_H_

View File

@ -61,7 +61,8 @@
// Disable MSVC2015 warning for std::pair:
// "decorated name length exceeded, name was truncated".
#if defined(_MSC_VER) && (_MSC_VER == 1900)
#if defined _MSC_VER
# pragma warning(push)
# pragma warning(disable:4503)
#endif
@ -6656,7 +6657,7 @@ TEST(AnyWithTest, TestUseInContainers) {
AnyWith<std::string>("merhaba"),
AnyWith<std::string>("salut")}));
}
#endif // GTEST_LANG_CXX11
#endif // GTEST_LANG_CXX11
TEST(AnyWithTest, TestCompare) {
EXPECT_THAT(SampleAnyType(1), AnyWith<int>(Gt(0)));
}
@ -6694,3 +6695,8 @@ TEST(NotTest, WorksOnMoveOnlyType) {
} // namespace gmock_matchers_test
} // namespace testing
#if defined_MSC_VER
# pragma warning(pop)
#endif