diff options
author | kosak <kosak@google.com> | 2014-11-17 02:42:33 +0000 |
---|---|---|
committer | kosak <kosak@google.com> | 2014-11-17 02:42:33 +0000 |
commit | f58b49a2b14f9903d3118ffdd1485cbbe7a230d7 (patch) | |
tree | 300198d564b4e3daf6b611f3fb6643466b401c8d /scripts/generator/cpp/gmock_class_test.py | |
parent | 6e87b780d34837f221f410a66c5b55d5bb76e45d (diff) | |
download | googletest-f58b49a2b14f9903d3118ffdd1485cbbe7a230d7.tar.gz googletest-f58b49a2b14f9903d3118ffdd1485cbbe7a230d7.tar.bz2 googletest-f58b49a2b14f9903d3118ffdd1485cbbe7a230d7.zip |
Handle parameters without variable names when the type includes *, & or [].
Diffstat (limited to 'scripts/generator/cpp/gmock_class_test.py')
-rwxr-xr-x | scripts/generator/cpp/gmock_class_test.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/generator/cpp/gmock_class_test.py b/scripts/generator/cpp/gmock_class_test.py index 361dad7f..ae3739af 100755 --- a/scripts/generator/cpp/gmock_class_test.py +++ b/scripts/generator/cpp/gmock_class_test.py @@ -219,6 +219,36 @@ class Foo { 'MOCK_METHOD0_T(Bar,\nint());', self.GenerateMethodSource(source)) + def testPointerArgWithoutNames(self): + source = """ +class Foo { + virtual int Bar(C*); +}; +""" + self.assertEqualIgnoreLeadingWhitespace( + 'MOCK_METHOD1(Bar,\nint(C*));', + self.GenerateMethodSource(source)) + + def testReferenceArgWithoutNames(self): + source = """ +class Foo { + virtual int Bar(C&); +}; +""" + self.assertEqualIgnoreLeadingWhitespace( + 'MOCK_METHOD1(Bar,\nint(C&));', + self.GenerateMethodSource(source)) + + def testArrayArgWithoutNames(self): + source = """ +class Foo { + virtual int Bar(C[]); +}; +""" + self.assertEqualIgnoreLeadingWhitespace( + 'MOCK_METHOD1(Bar,\nint(C[]));', + self.GenerateMethodSource(source)) + class GenerateMocksTest(TestCase): |