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/include/gmock/gmock-actions.h | |
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/include/gmock/gmock-actions.h')
-rw-r--r-- | googlemock/include/gmock/gmock-actions.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/googlemock/include/gmock/gmock-actions.h b/googlemock/include/gmock/gmock-actions.h index 9842f320..f12d39be 100644 --- a/googlemock/include/gmock/gmock-actions.h +++ b/googlemock/include/gmock/gmock-actions.h @@ -99,7 +99,8 @@ struct BuiltInDefaultValueGetter<T, false> { template <typename T> class BuiltInDefaultValue { public: - // This function returns true if type T has a built-in default value. + // This function returns true if and only if type T has a built-in default + // value. static bool Exists() { return ::std::is_default_constructible<T>::value; } @@ -208,7 +209,7 @@ class DefaultValue { producer_ = nullptr; } - // Returns true if the user has set the default value for type T. + // Returns true if and only if the user has set the default value for type T. static bool IsSet() { return producer_ != nullptr; } // Returns true if T has a default return value set by the user or there @@ -269,7 +270,7 @@ class DefaultValue<T&> { // Unsets the default value for type T&. static void Clear() { address_ = nullptr; } - // Returns true if the user has set the default value for type T&. + // Returns true if and only if the user has set the default value for type T&. static bool IsSet() { return address_ != nullptr; } // Returns true if T has a default return value set by the user or there @@ -375,7 +376,7 @@ class Action { template <typename Func> explicit Action(const Action<Func>& action) : fun_(action.fun_) {} - // Returns true if this is the DoDefault() action. + // Returns true if and only if this is the DoDefault() action. bool IsDoDefault() const { return fun_ == nullptr; } // Performs the action. Note that this method is const even though @@ -395,7 +396,7 @@ class Action { template <typename G> friend class Action; - // fun_ is an empty function if this is the DoDefault() action. + // fun_ is an empty function if and only if this is the DoDefault() action. ::std::function<F> fun_; }; |