diff options
author | Gennadiy Civil <gennadiycivil@users.noreply.github.com> | 2018-04-19 18:44:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-19 18:44:01 -0400 |
commit | a6f06bf2fd3b832822cd4e9e554b7d47f32ec084 (patch) | |
tree | a508ec458b7fee2f711bc40a29e197b1ea3f0647 /googlemock/include/gmock/internal/gmock-internal-utils.h | |
parent | 1114a0202a3147c1ce548c9a2883ce29e80df9e3 (diff) | |
parent | 884bcdaf182da9c1739858ff13f093f7db6ed0bc (diff) | |
download | googletest-a6f06bf2fd3b832822cd4e9e554b7d47f32ec084.tar.gz googletest-a6f06bf2fd3b832822cd4e9e554b7d47f32ec084.tar.bz2 googletest-a6f06bf2fd3b832822cd4e9e554b7d47f32ec084.zip |
Merge pull request #1582 from dnsunderland/parameterless
Introduce parameterless expectations
Diffstat (limited to 'googlemock/include/gmock/internal/gmock-internal-utils.h')
-rw-r--r-- | googlemock/include/gmock/internal/gmock-internal-utils.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h index 20c95c6a..4751788a 100644 --- a/googlemock/include/gmock/internal/gmock-internal-utils.h +++ b/googlemock/include/gmock/internal/gmock-internal-utils.h @@ -344,6 +344,21 @@ GTEST_API_ bool LogIsVisible(LogSeverity severity); GTEST_API_ void Log(LogSeverity severity, const std::string& message, int stack_frames_to_skip); +// A marker class that is used to resolve parameterless expectations to the +// correct overload. This must not be instantiable, to prevent client code from +// accidentally resolving to the overload; for example: +// +// ON_CALL(mock, Method({}, nullptr))… +// +class WithoutMatchers { + private: + WithoutMatchers() {} + friend GTEST_API_ WithoutMatchers GetWithoutMatchers(); +}; + +// Internal use only: access the singleton instance of WithoutMatchers. +GTEST_API_ WithoutMatchers GetWithoutMatchers(); + // TODO(wan@google.com): group all type utilities together. // Type traits. |