diff options
author | Gennadiy Civil <misterg@google.com> | 2018-04-12 17:42:47 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-04-12 17:42:47 (GMT) |
commit | fa658e0cc08075b134b5ed35808f31a557616c9c (patch) | |
tree | 6e141c396db864ef3ffbaae872c10146989684b4 /googlemock/test/gmock-generated-function-mockers_test.cc | |
parent | 531e29485c3bd21a5f2fa846dfc62f9c38756033 (diff) | |
download | googletest-fa658e0cc08075b134b5ed35808f31a557616c9c.zip googletest-fa658e0cc08075b134b5ed35808f31a557616c9c.tar.gz googletest-fa658e0cc08075b134b5ed35808f31a557616c9c.tar.bz2 |
merging refs/pull/1566/head
Diffstat (limited to 'googlemock/test/gmock-generated-function-mockers_test.cc')
-rw-r--r-- | googlemock/test/gmock-generated-function-mockers_test.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/googlemock/test/gmock-generated-function-mockers_test.cc b/googlemock/test/gmock-generated-function-mockers_test.cc index 08e5eba..0ff3755 100644 --- a/googlemock/test/gmock-generated-function-mockers_test.cc +++ b/googlemock/test/gmock-generated-function-mockers_test.cc @@ -620,5 +620,28 @@ TEST(MockFunctionTest, AsStdFunctionReturnsReference) { } #endif // GTEST_HAS_STD_FUNCTION_ +struct MockMethodSizes0 { + MOCK_METHOD0(func, void()); +}; +struct MockMethodSizes1 { + MOCK_METHOD1(func, void(int)); +}; +struct MockMethodSizes2 { + MOCK_METHOD2(func, void(int, int)); +}; +struct MockMethodSizes3 { + MOCK_METHOD3(func, void(int, int, int)); +}; +struct MockMethodSizes4 { + MOCK_METHOD4(func, void(int, int, int, int)); +}; + +TEST(MockFunctionTest, MockMethodSizeOverhead) { + EXPECT_EQ(sizeof(MockMethodSizes0), sizeof(MockMethodSizes1)); + EXPECT_EQ(sizeof(MockMethodSizes0), sizeof(MockMethodSizes2)); + EXPECT_EQ(sizeof(MockMethodSizes0), sizeof(MockMethodSizes3)); + EXPECT_EQ(sizeof(MockMethodSizes0), sizeof(MockMethodSizes4)); +} + } // namespace gmock_generated_function_mockers_test } // namespace testing |