Define the MOCK_METHOD macro (#2571)

Without the macro defined the following would yield a syntax error:
struct IFoo
{
	virtual GetInt(const std::string& name) = 0;
};

struct MockFoo : IFoo
{
	MOCK_METHOD(int32_t, GetInt, (const std::wstring &name), (override, const));
};

Co-authored-by: Christoph Strehle <strehle@teamviewer.com>
This commit is contained in:
ChristophStrehle 2020-03-17 14:25:07 +01:00 committed by GitHub
parent 4e63613855
commit b302896751
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -54,4 +54,5 @@
<define name="MATCHER_P8(name, p0, p1, p2, p3, p4, p5, p6, p7, description)" value="bool name##MatcherP8&lt;p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, p6##_type, p7##_type&gt;::gmock_Impl&lt;arg_type&gt;::MatchAndExplain(GTEST_REFERENCE_TO_CONST_(arg_type) arg,::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_) const"/>
<define name="MATCHER_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, description)" value="bool name##MatcherP9&lt;p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, p6##_type, p7##_type, p8##_type&gt;::gmock_Impl&lt;arg_type&gt;::MatchAndExplain(GTEST_REFERENCE_TO_CONST_(arg_type) arg,::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_) const"/>
<define name="MATCHER_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, description)" value="bool name##MatcherP10&lt;p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, p9##_type&gt;::gmock_Impl&lt;arg_type&gt;::MatchAndExplain(GTEST_REFERENCE_TO_CONST_(arg_type) arg,::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_) const"/>
<define name="MOCK_METHOD(...)" value="" />
</def>