summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Hananein <i@zloylos.me>2022-10-21 12:03:45 (GMT)
committerDenis Hananein <i@zloylos.me>2022-10-21 12:03:45 (GMT)
commit0d263789198e021b688942c55d483ad670c66f22 (patch)
tree26f17fa3ee295be4641a911eeac78cd9a23e19fe
parentf3eb2b7e38e132402f8f67e86feb97813714c3d7 (diff)
downloadgoogletest-0d263789198e021b688942c55d483ad670c66f22.zip
googletest-0d263789198e021b688942c55d483ad670c66f22.tar.gz
googletest-0d263789198e021b688942c55d483ad670c66f22.tar.bz2
Change messages
Signed-off-by: Denis Hananein <i@zloylos.me>
-rw-r--r--googlemock/include/gmock/gmock-spec-builders.h12
-rw-r--r--googlemock/src/gmock-spec-builders.cc7
2 files changed, 9 insertions, 10 deletions
diff --git a/googlemock/include/gmock/gmock-spec-builders.h b/googlemock/include/gmock/gmock-spec-builders.h
index 1d70675..1168d22 100644
--- a/googlemock/include/gmock/gmock-spec-builders.h
+++ b/googlemock/include/gmock/gmock-spec-builders.h
@@ -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));
}
diff --git a/googlemock/src/gmock-spec-builders.cc b/googlemock/src/gmock-spec-builders.cc
index e5f4609..66fb434 100644
--- a/googlemock/src/gmock-spec-builders.cc
+++ b/googlemock/src/gmock-spec-builders.cc
@@ -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.