diff options
author | Shaindel Schwartz <shaindel@google.com> | 2019-09-12 12:10:51 -0400 |
---|---|---|
committer | Shaindel Schwartz <shaindel@google.com> | 2019-09-12 12:10:51 -0400 |
commit | c7a03daa99e7c457561b5dd2afc0eddab166e48e (patch) | |
tree | ef122e5c8d5e0c5239a29f1a56012445f59cb867 /googlemock/src | |
parent | ac24edd6e06114818b1a29c99bb81153514f7fb2 (diff) | |
parent | 7bd4a7f3e9ae46bb7d99fc5fd5dd1a137496bb6a (diff) | |
download | googletest-c7a03daa99e7c457561b5dd2afc0eddab166e48e.tar.gz googletest-c7a03daa99e7c457561b5dd2afc0eddab166e48e.tar.bz2 googletest-c7a03daa99e7c457561b5dd2afc0eddab166e48e.zip |
Merge pull request #2387 from kuzkry:iff
PiperOrigin-RevId: 268693457
Diffstat (limited to 'googlemock/src')
-rw-r--r-- | googlemock/src/gmock-internal-utils.cc | 6 | ||||
-rw-r--r-- | googlemock/src/gmock-spec-builders.cc | 13 | ||||
-rw-r--r-- | googlemock/src/gmock.cc | 4 |
3 files changed, 12 insertions, 11 deletions
diff --git a/googlemock/src/gmock-internal-utils.cc b/googlemock/src/gmock-internal-utils.cc index 1292e1d8..e5b54798 100644 --- a/googlemock/src/gmock-internal-utils.cc +++ b/googlemock/src/gmock-internal-utils.cc @@ -123,8 +123,8 @@ GTEST_API_ FailureReporterInterface* GetFailureReporter() { // Protects global resources (stdout in particular) used by Log(). static GTEST_DEFINE_STATIC_MUTEX_(g_log_mutex); -// Returns true if a log with the given severity is visible according -// to the --gmock_verbose flag. +// Returns true if and only if a log with the given severity is visible +// according to the --gmock_verbose flag. GTEST_API_ bool LogIsVisible(LogSeverity severity) { if (GMOCK_FLAG(verbose) == kInfoVerbosity) { // Always show the log if --gmock_verbose=info. @@ -139,7 +139,7 @@ GTEST_API_ bool LogIsVisible(LogSeverity severity) { } } -// Prints the given message to stdout if 'severity' >= the level +// Prints the given message to stdout if and only if 'severity' >= the level // specified by the --gmock_verbose flag. If stack_frames_to_skip >= // 0, also prints the stack trace excluding the top // stack_frames_to_skip frames. In opt mode, any positive diff --git a/googlemock/src/gmock-spec-builders.cc b/googlemock/src/gmock-spec-builders.cc index f6705a32..f9d34345 100644 --- a/googlemock/src/gmock-spec-builders.cc +++ b/googlemock/src/gmock-spec-builders.cc @@ -126,8 +126,8 @@ void ExpectationBase::RetireAllPreRequisites() } } -// Returns true if all pre-requisites of this expectation have been -// satisfied. +// Returns true if and only if all pre-requisites of this expectation +// have been satisfied. bool ExpectationBase::AllPrerequisitesAreSatisfied() const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) { g_gmock_mutex.AssertHeld(); @@ -384,7 +384,7 @@ UntypedActionResultHolderBase* UntypedFunctionMockerBase::UntypedInvokeWith( const CallReaction reaction = Mock::GetReactionOnUninterestingCalls(MockObject()); - // True if we need to print this call's arguments and return + // True if and only if we need to print this call's arguments and return // value. This definition must be kept in sync with // the behavior of ReportUninterestingCall(). const bool need_to_report_uninteresting_call = @@ -435,7 +435,8 @@ UntypedActionResultHolderBase* UntypedFunctionMockerBase::UntypedInvokeWith( &ss, &why); const bool found = untyped_expectation != nullptr; - // True if we need to print the call's arguments and return value. + // True if and only if we need to print the call's arguments + // and return value. // This definition must be kept in sync with the uses of Expect() // and Log() in this function. const bool need_to_report_call = @@ -574,7 +575,7 @@ struct MockObjectState { int first_used_line; ::std::string first_used_test_suite; ::std::string first_used_test; - bool leakable; // true if it's OK to leak the object. + bool leakable; // true if and only if it's OK to leak the object. FunctionMockers function_mockers; // All registered methods of the object. }; @@ -718,7 +719,7 @@ bool Mock::VerifyAndClearExpectations(void* mock_obj) } // Verifies all expectations on the given mock object and clears its -// default actions and expectations. Returns true if the +// default actions and expectations. Returns true if and only if the // verification was successful. bool Mock::VerifyAndClear(void* mock_obj) GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { diff --git a/googlemock/src/gmock.cc b/googlemock/src/gmock.cc index ce926f2d..32b2a739 100644 --- a/googlemock/src/gmock.cc +++ b/googlemock/src/gmock.cc @@ -34,8 +34,8 @@ namespace testing { GMOCK_DEFINE_bool_(catch_leaked_mocks, true, - "true if Google Mock should report leaked mock objects " - "as failures."); + "true if and only if Google Mock should report leaked " + "mock objects as failures."); GMOCK_DEFINE_string_(verbose, internal::kWarningVerbosity, "Controls how verbose Google Mock's output is." |