`struct SumAction {` + `template + `T operator()(T x, Ty) { return x + y; }` + `};` + |
+ Defines a generic functor that can be used as an action summing its + arguments. |
Simple | |
---|---|
Old | `MOCK_METHOD1(Foo, bool(int))` |
New | `MOCK_METHOD(bool, Foo, (int))` |
Const Method | |
Old | +`MOCK_CONST_METHOD1(Foo, bool(int))` |
New | +`MOCK_METHOD(bool, Foo, (int), (const))` |
Method in a Class Template | |
Old | +`MOCK_METHOD1_T(Foo, bool(int))` |
New | +`MOCK_METHOD(bool, Foo, (int))` |
Const Method in a Class Template | |
Old + | `MOCK_CONST_METHOD1_T(Foo, bool(int))` |
New + | `MOCK_METHOD(bool, Foo, (int), (const))` |
Method with Call Type | |
Old | +`MOCK_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, Foo, bool(int))` |
New | `MOCK_METHOD(bool, Foo, (int), +(Calltype(STDMETHODCALLTYPE)))` |
Const Method with Call Type | |
Old | +`MOCK_CONST_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, Foo, bool(int))` | +
New | `MOCK_METHOD(bool, Foo, (int), (const, +Calltype(STDMETHODCALLTYPE)))` |
Method with Call Type in a Class Template | |
Old | `MOCK_METHOD1_T_WITH_CALLTYPE(STDMETHODCALLTYPE, Foo, +bool(int))` |
New | `MOCK_METHOD(bool, Foo, (int), +(Calltype(STDMETHODCALLTYPE)))` |
Const Method with Call Type in a Class Template | |
Old | `MOCK_CONST_METHOD1_T_WITH_CALLTYPE(STDMETHODCALLTYPE, +Foo, bool(int))` |
New | `MOCK_METHOD(bool, Foo, +(int), (const, Calltype(STDMETHODCALLTYPE)))` |