summaryrefslogtreecommitdiffstats
path: root/googlemock/src
diff options
context:
space:
mode:
authorTaylor Cramer <cramertj@google.com>2021-11-15 21:47:36 (GMT)
committerCopybara-Service <copybara-worker@google.com>2021-11-15 21:48:12 (GMT)
commit1a3e2a265f35e604378156cd675b11ef0a184627 (patch)
treef20f52ef000f59ecec86ab51629c211c3f7b41da /googlemock/src
parent4848324c5ff3186a7f72a674f6760d0b8da585d7 (diff)
downloadgoogletest-1a3e2a265f35e604378156cd675b11ef0a184627.zip
googletest-1a3e2a265f35e604378156cd675b11ef0a184627.tar.gz
googletest-1a3e2a265f35e604378156cd675b11ef0a184627.tar.bz2
Clarify "Times() after X" error message
The previous error message could be misinterpreted to mean that `Times` could not be used in combination with `WillRepeatedly`, when in fact the call to `Times` just needs to happen *first*. PiperOrigin-RevId: 410070405 Change-Id: I747d34a4334cf2e56d589dcad3a08a8f322d77c8
Diffstat (limited to 'googlemock/src')
-rw-r--r--googlemock/src/gmock-spec-builders.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/googlemock/src/gmock-spec-builders.cc b/googlemock/src/gmock-spec-builders.cc
index df023e4..8f8d7f9 100644
--- a/googlemock/src/gmock-spec-builders.cc
+++ b/googlemock/src/gmock-spec-builders.cc
@@ -264,10 +264,10 @@ void ExpectationBase::UntypedTimes(const Cardinality& a_cardinality) {
".Times() cannot appear "
"more than once in an EXPECT_CALL().");
} else {
- ExpectSpecProperty(last_clause_ < kTimes,
- ".Times() cannot appear after "
- ".InSequence(), .WillOnce(), .WillRepeatedly(), "
- "or .RetiresOnSaturation().");
+ ExpectSpecProperty(
+ last_clause_ < kTimes,
+ ".Times() may only appear *before* .InSequence(), .WillOnce(), "
+ ".WillRepeatedly(), or .RetiresonSaturation(), not after.");
}
last_clause_ = kTimes;