Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
e9faae17
Commit
e9faae17
authored
Mar 21, 2023
by
Abseil Team
Committed by
Copybara-Service
Mar 21, 2023
Browse files
Internal Code Change
PiperOrigin-RevId: 518213370 Change-Id: I88d0acc195dadf8d03cd15c8534c721141db14ea
parent
fa872098
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
googlemock/include/gmock/gmock-matchers.h
googlemock/include/gmock/gmock-matchers.h
+5
-5
No files found.
googlemock/include/gmock/gmock-matchers.h
View file @
e9faae17
...
@@ -563,7 +563,7 @@ namespace internal {
...
@@ -563,7 +563,7 @@ namespace internal {
// If the explanation is not empty, prints it to the ostream.
// If the explanation is not empty, prints it to the ostream.
inline
void
PrintIfNotEmpty
(
const
std
::
string
&
explanation
,
inline
void
PrintIfNotEmpty
(
const
std
::
string
&
explanation
,
::
std
::
ostream
*
os
)
{
::
std
::
ostream
*
os
)
{
if
(
explanation
!=
""
&&
os
!=
nullptr
)
{
if
(
!
explanation
.
empty
()
&&
os
!=
nullptr
)
{
*
os
<<
", "
<<
explanation
;
*
os
<<
", "
<<
explanation
;
}
}
}
}
...
@@ -2966,7 +2966,7 @@ class KeyMatcherImpl : public MatcherInterface<PairType> {
...
@@ -2966,7 +2966,7 @@ class KeyMatcherImpl : public MatcherInterface<PairType> {
const
bool
match
=
inner_matcher_
.
MatchAndExplain
(
const
bool
match
=
inner_matcher_
.
MatchAndExplain
(
pair_getters
::
First
(
key_value
,
Rank0
()),
&
inner_listener
);
pair_getters
::
First
(
key_value
,
Rank0
()),
&
inner_listener
);
const
std
::
string
explanation
=
inner_listener
.
str
();
const
std
::
string
explanation
=
inner_listener
.
str
();
if
(
explanation
!=
""
)
{
if
(
!
explanation
.
empty
()
)
{
*
listener
<<
"whose first field is a value "
<<
explanation
;
*
listener
<<
"whose first field is a value "
<<
explanation
;
}
}
return
match
;
return
match
;
...
@@ -3113,12 +3113,12 @@ class PairMatcherImpl : public MatcherInterface<PairType> {
...
@@ -3113,12 +3113,12 @@ class PairMatcherImpl : public MatcherInterface<PairType> {
const
std
::
string
&
second_explanation
,
const
std
::
string
&
second_explanation
,
MatchResultListener
*
listener
)
const
{
MatchResultListener
*
listener
)
const
{
*
listener
<<
"whose both fields match"
;
*
listener
<<
"whose both fields match"
;
if
(
first_explanation
!=
""
)
{
if
(
!
first_explanation
.
empty
()
)
{
*
listener
<<
", where the first field is a value "
<<
first_explanation
;
*
listener
<<
", where the first field is a value "
<<
first_explanation
;
}
}
if
(
second_explanation
!=
""
)
{
if
(
!
second_explanation
.
empty
()
)
{
*
listener
<<
", "
;
*
listener
<<
", "
;
if
(
first_explanation
!=
""
)
{
if
(
!
first_explanation
.
empty
()
)
{
*
listener
<<
"and "
;
*
listener
<<
"and "
;
}
else
{
}
else
{
*
listener
<<
"where "
;
*
listener
<<
"where "
;
...
...
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