summaryrefslogtreecommitdiffstats
path: root/googlemock/test
diff options
context:
space:
mode:
authordmauro <dmauro@google.com>2020-03-16 15:35:02 (GMT)
committervslashg <gfalcon@google.com>2020-03-17 21:20:39 (GMT)
commitc43f7100f084db17197c34c2d776ad2973dbf539 (patch)
treea48cc9493bc2e690b2d5b7728b28b1504237809e /googlemock/test
parent227faf41db5eec00fa2b316098a49771b2fb4ad8 (diff)
downloadgoogletest-c43f7100f084db17197c34c2d776ad2973dbf539.zip
googletest-c43f7100f084db17197c34c2d776ad2973dbf539.tar.gz
googletest-c43f7100f084db17197c34c2d776ad2973dbf539.tar.bz2
Googletest export
Use a polymorphic matcher instead of the GreaterThan<int> test matcher to fix the sign-comparison warning on MSVC. PiperOrigin-RevId: 301163657
Diffstat (limited to 'googlemock/test')
-rw-r--r--googlemock/test/gmock-matchers_test.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc
index 3619959..186d8aa 100644
--- a/googlemock/test/gmock-matchers_test.cc
+++ b/googlemock/test/gmock-matchers_test.cc
@@ -4726,20 +4726,18 @@ TEST(SizeIsTest, ExplainsResult) {
Matcher<vector<int> > m1 = SizeIs(2);
Matcher<vector<int> > m2 = SizeIs(Lt(2u));
Matcher<vector<int> > m3 = SizeIs(AnyOf(0, 3));
- Matcher<vector<int> > m4 = SizeIs(GreaterThan(1));
+ Matcher<vector<int> > m4 = SizeIs(Gt(1u));
vector<int> 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