aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/generator/cpp/gmock_class_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/generator/cpp/gmock_class_test.py')
-rwxr-xr-xscripts/generator/cpp/gmock_class_test.py30
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):