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
0d263789
Commit
0d263789
authored
Oct 21, 2022
by
Denis Hananein
Browse files
Change messages
Signed-off-by:
Denis Hananein
<
i@zloylos.me
>
parent
f3eb2b7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
googlemock/include/gmock/gmock-spec-builders.h
googlemock/include/gmock/gmock-spec-builders.h
+6
-6
googlemock/src/gmock-spec-builders.cc
googlemock/src/gmock-spec-builders.cc
+3
-4
No files found.
googlemock/include/gmock/gmock-spec-builders.h
View file @
0d263789
...
...
@@ -1213,11 +1213,11 @@ class TypedExpectation<R(Args...)> : public ExpectationBase {
if
(
IsSaturated
())
{
// We have an excessive call.
IncrementCallCount
();
*
what
<<
"Mock function "
;
*
what
<<
"Mock function
called more times than expected
"
;
if
(
!
expectation_name
.
empty
())
{
*
what
<<
"
with name
\"
"
<<
expectation_name
<<
"
\"
"
;
*
what
<<
"
for
\"
"
<<
expectation_name
<<
"
\"
"
;
}
*
what
<<
"
called more times than expected
- "
;
*
what
<<
" - "
;
mocker
->
DescribeDefaultActionTo
(
args
,
what
);
DescribeCallCountTo
(
why
);
...
...
@@ -1232,11 +1232,11 @@ class TypedExpectation<R(Args...)> : public ExpectationBase {
}
// Must be done after IncrementCount()!
*
what
<<
"Mock function "
;
*
what
<<
"Mock function
call matches
"
;
if
(
!
expectation_name
.
empty
())
{
*
what
<<
"
with name
\"
"
<<
expectation_name
<<
"
\"
"
;
*
what
<<
"
\"
"
<<
expectation_name
<<
"
\"
"
;
}
*
what
<<
"call matches "
<<
source_text
()
<<
"...
\n
"
;
*
what
<<
source_text
()
<<
"...
\n
"
;
return
&
(
GetCurrentAction
(
mocker
,
args
));
}
...
...
googlemock/src/gmock-spec-builders.cc
View file @
0d263789
...
...
@@ -411,12 +411,11 @@ bool UntypedFunctionMockerBase::VerifyAndClearExpectationsLocked()
::
std
::
stringstream
ss
;
const
::
std
::
string
&
expectation_name
=
untyped_expectation
->
GetName
();
ss
<<
"Actual function"
;
ss
<<
"Actual function
call count doesn't match
"
;
if
(
!
expectation_name
.
empty
())
{
ss
<<
"
with name
\"
"
<<
expectation_name
<<
"
\"
"
;
ss
<<
"
\"
"
<<
expectation_name
<<
"
\"
"
;
}
ss
<<
" call count doesn't match "
<<
untyped_expectation
->
source_text
()
<<
"...
\n
"
;
ss
<<
untyped_expectation
->
source_text
()
<<
"...
\n
"
;
// No need to show the source file location of the expectation
// in the description, as the Expect() call that follows already
// takes care of it.
...
...
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