From c43f7100f084db17197c34c2d776ad2973dbf539 Mon Sep 17 00:00:00 2001 From: dmauro Date: Mon, 16 Mar 2020 11:35:02 -0400 Subject: Googletest export Use a polymorphic matcher instead of the GreaterThan test matcher to fix the sign-comparison warning on MSVC. PiperOrigin-RevId: 301163657 --- googlemock/test/gmock-matchers_test.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'googlemock') diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index 3619959f..186d8aae 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -4726,20 +4726,18 @@ TEST(SizeIsTest, ExplainsResult) { Matcher > m1 = SizeIs(2); Matcher > m2 = SizeIs(Lt(2u)); Matcher > m3 = SizeIs(AnyOf(0, 3)); - Matcher > m4 = SizeIs(GreaterThan(1)); + Matcher > m4 = SizeIs(Gt(1u)); vector container; EXPECT_EQ("whose size 0 doesn't match", Explain(m1, container)); EXPECT_EQ("whose size 0 matches", Explain(m2, container)); EXPECT_EQ("whose size 0 matches", Explain(m3, container)); - EXPECT_EQ("whose size 0 doesn't match, which is 1 less than 1", - Explain(m4, container)); + EXPECT_EQ("whose size 0 doesn't match", Explain(m4, container)); container.push_back(0); container.push_back(0); EXPECT_EQ("whose size 2 matches", Explain(m1, container)); EXPECT_EQ("whose size 2 doesn't match", Explain(m2, container)); EXPECT_EQ("whose size 2 doesn't match", Explain(m3, container)); - EXPECT_EQ("whose size 2 matches, which is 1 more than 1", - Explain(m4, container)); + EXPECT_EQ("whose size 2 matches", Explain(m4, container)); } #if GTEST_HAS_TYPED_TEST -- cgit v1.2.3