diff options
author | Abseil Team <absl-team@google.com> | 2020-01-09 16:59:39 (GMT) |
---|---|---|
committer | Andy Soffer <asoffer@google.com> | 2020-01-09 23:25:24 (GMT) |
commit | c901f67ddf8aab44443f1be3efe864cb3daa95af (patch) | |
tree | 19496ce176048d494322e7286bf56724d08d2841 /googlemock/include/gmock/gmock-generated-actions.h.pump | |
parent | 8417b7332210322090337d3232e39503437790f0 (diff) | |
download | googletest-c901f67ddf8aab44443f1be3efe864cb3daa95af.zip googletest-c901f67ddf8aab44443f1be3efe864cb3daa95af.tar.gz googletest-c901f67ddf8aab44443f1be3efe864cb3daa95af.tar.bz2 |
Googletest export
Move part of functionality of Action* class to the base one. Reduce copypaste.
Make constructor and conversion operator of Action* class independent of pump.
PiperOrigin-RevId: 288907005
Diffstat (limited to 'googlemock/include/gmock/gmock-generated-actions.h.pump')
-rw-r--r-- | googlemock/include/gmock/gmock-generated-actions.h.pump | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/googlemock/include/gmock/gmock-generated-actions.h.pump b/googlemock/include/gmock/gmock-generated-actions.h.pump index bd3eadb..45751c6 100644 --- a/googlemock/include/gmock/gmock-generated-actions.h.pump +++ b/googlemock/include/gmock/gmock-generated-actions.h.pump @@ -423,9 +423,10 @@ $var macro_name = [[$if i==0 [[ACTION]] $elif i==1 [[ACTION_P]] $else [[ACTION_P$i]]]] #define $macro_name(name$for j [[, p$j]])\$template - class $class_name {\ + class $class_name : public ::testing::internal::ActionImpl<$class_name$param_types> {\ + using base_type = ::testing::internal::ActionImpl<$class_name>;\ public:\ - [[$if i==1 [[explicit ]]]]$class_name($ctor_param_list)$inits {}\ + using base_type::base_type;\ template <typename F>\ class gmock_Impl : public ::testing::ActionInterface<F> {\ public:\ @@ -444,9 +445,6 @@ $arg_types_and_names) const;\$param_field_decls private:\ GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ };\ - template <typename F> operator ::testing::Action<F>() const {\ - return ::testing::Action<F>(new gmock_Impl<F>($params));\ - }\$param_field_decls2 private:\ GTEST_DISALLOW_ASSIGN_($class_name);\ };\$template |