Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
c43f7100
Commit
c43f7100
authored
Mar 16, 2020
by
dmauro
Committed by
vslashg
Mar 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Googletest export
Use a polymorphic matcher instead of the GreaterThan<int> test matcher to fix the sign-comparison warning on MSVC. PiperOrigin-RevId: 301163657
parent
227faf41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
gmock-matchers_test.cc
googlemock/test/gmock-matchers_test.cc
+3
-5
No files found.
googlemock/test/gmock-matchers_test.cc
View file @
c43f7100
...
...
@@ -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
(
G
reaterThan
(
1
));
Matcher
<
vector
<
int
>
>
m4
=
SizeIs
(
G
t
(
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment