proxygen
cpp.gmock_class_test.GenerateMethodsTest Class Reference
Inheritance diagram for cpp.gmock_class_test.GenerateMethodsTest:
cpp.gmock_class_test.TestCase cpp.gmock_class_test.TestCase cpp.gmock_class_test.TestCase

Public Member Functions

def GenerateMethodSource (self, cpp_source)
 
def testSimpleMethod (self)
 
def testSimpleConstructorsAndDestructor (self)
 
def testVirtualDestructor (self)
 
def testExplicitlyDefaultedConstructorsAndDestructor (self)
 
def testExplicitlyDeletedConstructorsAndDestructor (self)
 
def testSimpleOverrideMethod (self)
 
def testSimpleConstMethod (self)
 
def testExplicitVoid (self)
 
def testStrangeNewlineInParameter (self)
 
def testDefaultParameters (self)
 
def testMultipleDefaultParameters (self)
 
def testRemovesCommentsWhenDefaultsArePresent (self)
 
def testDoubleSlashCommentsInParameterListAreRemoved (self)
 
def testCStyleCommentsInParameterListAreNotRemoved (self)
 
def testArgsOfTemplateTypes (self)
 
def testReturnTypeWithOneTemplateArg (self)
 
def testReturnTypeWithManyTemplateArgs (self)
 
def testSimpleMethodInTemplatedClass (self)
 
def testPointerArgWithoutNames (self)
 
def testReferenceArgWithoutNames (self)
 
def testArrayArgWithoutNames (self)
 
def GenerateMethodSource (self, cpp_source)
 
def testSimpleMethod (self)
 
def testSimpleConstructorsAndDestructor (self)
 
def testVirtualDestructor (self)
 
def testExplicitlyDefaultedConstructorsAndDestructor (self)
 
def testExplicitlyDeletedConstructorsAndDestructor (self)
 
def testSimpleOverrideMethod (self)
 
def testSimpleConstMethod (self)
 
def testExplicitVoid (self)
 
def testStrangeNewlineInParameter (self)
 
def testDefaultParameters (self)
 
def testMultipleDefaultParameters (self)
 
def testRemovesCommentsWhenDefaultsArePresent (self)
 
def testDoubleSlashCommentsInParameterListAreRemoved (self)
 
def testCStyleCommentsInParameterListAreNotRemoved (self)
 
def testArgsOfTemplateTypes (self)
 
def testReturnTypeWithOneTemplateArg (self)
 
def testReturnTypeWithManyTemplateArgs (self)
 
def testSimpleMethodInTemplatedClass (self)
 
def testPointerArgWithoutNames (self)
 
def testReferenceArgWithoutNames (self)
 
def testArrayArgWithoutNames (self)
 
def GenerateMethodSource (self, cpp_source)
 
def testSimpleMethod (self)
 
def testSimpleConstructorsAndDestructor (self)
 
def testVirtualDestructor (self)
 
def testExplicitlyDefaultedConstructorsAndDestructor (self)
 
def testExplicitlyDeletedConstructorsAndDestructor (self)
 
def testSimpleOverrideMethod (self)
 
def testSimpleConstMethod (self)
 
def testExplicitVoid (self)
 
def testStrangeNewlineInParameter (self)
 
def testDefaultParameters (self)
 
def testMultipleDefaultParameters (self)
 
def testRemovesCommentsWhenDefaultsArePresent (self)
 
def testDoubleSlashCommentsInParameterListAreRemoved (self)
 
def testCStyleCommentsInParameterListAreNotRemoved (self)
 
def testArgsOfTemplateTypes (self)
 
def testReturnTypeWithOneTemplateArg (self)
 
def testReturnTypeWithManyTemplateArgs (self)
 
def testSimpleMethodInTemplatedClass (self)
 
def testPointerArgWithoutNames (self)
 
def testReferenceArgWithoutNames (self)
 
def testArrayArgWithoutNames (self)
 
- Public Member Functions inherited from cpp.gmock_class_test.TestCase
def StripLeadingWhitespace (self, lines)
 
def assertEqualIgnoreLeadingWhitespace (self, expected_lines, lines)
 
def StripLeadingWhitespace (self, lines)
 
def assertEqualIgnoreLeadingWhitespace (self, expected_lines, lines)
 
def StripLeadingWhitespace (self, lines)
 
def assertEqualIgnoreLeadingWhitespace (self, expected_lines, lines)
 

Detailed Description

Definition at line 46 of file gmock_class_test.py.

Member Function Documentation

def cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource (   self,
  cpp_source 
)
Convert C++ source to Google Mock output source lines.

Definition at line 48 of file gmock_class_test.py.

References join, and bm.list.

Referenced by cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), cpp.gmock_class_test.GenerateMethodsTest.testArgsOfTemplateTypes(), cpp.gmock_class_test.GenerateMethodsTest.testArrayArgWithoutNames(), cpp.gmock_class_test.GenerateMethodsTest.testCStyleCommentsInParameterListAreNotRemoved(), cpp.gmock_class_test.GenerateMethodsTest.testDefaultParameters(), cpp.gmock_class_test.GenerateMethodsTest.testDoubleSlashCommentsInParameterListAreRemoved(), cpp.gmock_class_test.GenerateMethodsTest.testExplicitlyDefaultedConstructorsAndDestructor(), cpp.gmock_class_test.GenerateMethodsTest.testExplicitlyDeletedConstructorsAndDestructor(), cpp.gmock_class_test.GenerateMethodsTest.testExplicitVoid(), cpp.gmock_class_test.GenerateMethodsTest.testMultipleDefaultParameters(), cpp.gmock_class_test.GenerateMethodsTest.testPointerArgWithoutNames(), cpp.gmock_class_test.GenerateMethodsTest.testReferenceArgWithoutNames(), cpp.gmock_class_test.GenerateMethodsTest.testRemovesCommentsWhenDefaultsArePresent(), cpp.gmock_class_test.GenerateMethodsTest.testReturnTypeWithManyTemplateArgs(), cpp.gmock_class_test.GenerateMethodsTest.testReturnTypeWithOneTemplateArg(), cpp.gmock_class_test.GenerateMethodsTest.testSimpleConstMethod(), cpp.gmock_class_test.GenerateMethodsTest.testSimpleConstructorsAndDestructor(), cpp.gmock_class_test.GenerateMethodsTest.testSimpleMethod(), cpp.gmock_class_test.GenerateMethodsTest.testSimpleMethodInTemplatedClass(), cpp.gmock_class_test.GenerateMethodsTest.testSimpleOverrideMethod(), cpp.gmock_class_test.GenerateMethodsTest.testStrangeNewlineInParameter(), and cpp.gmock_class_test.GenerateMethodsTest.testVirtualDestructor().

48  def GenerateMethodSource(self, cpp_source):
49  """Convert C++ source to Google Mock output source lines."""
50  method_source_lines = []
51  # <test> is a pseudo-filename, it is not read or written.
52  builder = ast.BuilderFromSource(cpp_source, '<test>')
53  ast_list = list(builder.Generate())
54  gmock_class._GenerateMethods(method_source_lines, cpp_source, ast_list[0])
55  return '\n'.join(method_source_lines)
56 
Encoder::MutableCompressedList list
#define join
def cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource (   self,
  cpp_source 
)
Convert C++ source to Google Mock output source lines.

Definition at line 48 of file gmock_class_test.py.

References cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), join, and bm.list.

48  def GenerateMethodSource(self, cpp_source):
49  """Convert C++ source to Google Mock output source lines."""
50  method_source_lines = []
51  # <test> is a pseudo-filename, it is not read or written.
52  builder = ast.BuilderFromSource(cpp_source, '<test>')
53  ast_list = list(builder.Generate())
54  gmock_class._GenerateMethods(method_source_lines, cpp_source, ast_list[0])
55  return '\n'.join(method_source_lines)
56 
Encoder::MutableCompressedList list
#define join
def cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource (   self,
  cpp_source 
)
Convert C++ source to Google Mock output source lines.

Definition at line 48 of file gmock_class_test.py.

References cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), join, and bm.list.

48  def GenerateMethodSource(self, cpp_source):
49  """Convert C++ source to Google Mock output source lines."""
50  method_source_lines = []
51  # <test> is a pseudo-filename, it is not read or written.
52  builder = ast.BuilderFromSource(cpp_source, '<test>')
53  ast_list = list(builder.Generate())
54  gmock_class._GenerateMethods(method_source_lines, cpp_source, ast_list[0])
55  return '\n'.join(method_source_lines)
56 
Encoder::MutableCompressedList list
#define join
def cpp.gmock_class_test.GenerateMethodsTest.testArgsOfTemplateTypes (   self)

Definition at line 236 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testArgsOfTemplateTypes().

237  source = """
238 class Foo {
239  public:
240  virtual int Bar(const vector<int>& v, map<int, string>* output);
241 };"""
243  'MOCK_METHOD2(Bar,\n'
244  'int(const vector<int>& v, map<int, string>* output));',
245  self.GenerateMethodSource(source))
246 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testArgsOfTemplateTypes (   self)

Definition at line 236 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testArgsOfTemplateTypes().

237  source = """
238 class Foo {
239  public:
240  virtual int Bar(const vector<int>& v, map<int, string>* output);
241 };"""
243  'MOCK_METHOD2(Bar,\n'
244  'int(const vector<int>& v, map<int, string>* output));',
245  self.GenerateMethodSource(source))
246 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testArgsOfTemplateTypes (   self)

Definition at line 236 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testArgsOfTemplateTypes().

237  source = """
238 class Foo {
239  public:
240  virtual int Bar(const vector<int>& v, map<int, string>* output);
241 };"""
243  'MOCK_METHOD2(Bar,\n'
244  'int(const vector<int>& v, map<int, string>* output));',
245  self.GenerateMethodSource(source))
246 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testArrayArgWithoutNames (   self)

Definition at line 304 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testArrayArgWithoutNames().

305  source = """
306 class Foo {
307  virtual int Bar(C[]);
308 };
309 """
311  'MOCK_METHOD1(Bar,\nint(C[]));',
312  self.GenerateMethodSource(source))
313 
314 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testArrayArgWithoutNames (   self)

Definition at line 304 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testArrayArgWithoutNames().

305  source = """
306 class Foo {
307  virtual int Bar(C[]);
308 };
309 """
311  'MOCK_METHOD1(Bar,\nint(C[]));',
312  self.GenerateMethodSource(source))
313 
314 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testArrayArgWithoutNames (   self)

Definition at line 304 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testArrayArgWithoutNames().

305  source = """
306 class Foo {
307  virtual int Bar(C[]);
308 };
309 """
311  'MOCK_METHOD1(Bar,\nint(C[]));',
312  self.GenerateMethodSource(source))
313 
314 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testCStyleCommentsInParameterListAreNotRemoved (   self)

Definition at line 222 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testCStyleCommentsInParameterListAreNotRemoved().

223  # NOTE(nnorwitz): I'm not sure if it's the best behavior to keep these
224  # comments. Also note that C style comments after the last parameter
225  # are still elided.
226  source = """
227 class Foo {
228  public:
229  virtual const string& Bar(int /* keeper */, int b);
230 };
231 """
233  'MOCK_METHOD2(Bar,\nconst string&(int /* keeper */, int b));',
234  self.GenerateMethodSource(source))
235 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testCStyleCommentsInParameterListAreNotRemoved (   self)

Definition at line 222 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testCStyleCommentsInParameterListAreNotRemoved().

223  # NOTE(nnorwitz): I'm not sure if it's the best behavior to keep these
224  # comments. Also note that C style comments after the last parameter
225  # are still elided.
226  source = """
227 class Foo {
228  public:
229  virtual const string& Bar(int /* keeper */, int b);
230 };
231 """
233  'MOCK_METHOD2(Bar,\nconst string&(int /* keeper */, int b));',
234  self.GenerateMethodSource(source))
235 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testCStyleCommentsInParameterListAreNotRemoved (   self)

Definition at line 222 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testCStyleCommentsInParameterListAreNotRemoved().

223  # NOTE(nnorwitz): I'm not sure if it's the best behavior to keep these
224  # comments. Also note that C style comments after the last parameter
225  # are still elided.
226  source = """
227 class Foo {
228  public:
229  virtual const string& Bar(int /* keeper */, int b);
230 };
231 """
233  'MOCK_METHOD2(Bar,\nconst string&(int /* keeper */, int b));',
234  self.GenerateMethodSource(source))
235 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testDefaultParameters (   self)

Definition at line 175 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testDefaultParameters().

176  source = """
177 class Foo {
178  public:
179  virtual void Bar(int a, char c = 'x') = 0;
180 };
181 """
183  'MOCK_METHOD2(Bar,\nvoid(int, char));',
184  self.GenerateMethodSource(source))
185 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testDefaultParameters (   self)

Definition at line 175 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testDefaultParameters().

176  source = """
177 class Foo {
178  public:
179  virtual void Bar(int a, char c = 'x') = 0;
180 };
181 """
183  'MOCK_METHOD2(Bar,\nvoid(int, char));',
184  self.GenerateMethodSource(source))
185 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testDefaultParameters (   self)

Definition at line 175 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testDefaultParameters().

176  source = """
177 class Foo {
178  public:
179  virtual void Bar(int a, char c = 'x') = 0;
180 };
181 """
183  'MOCK_METHOD2(Bar,\nvoid(int, char));',
184  self.GenerateMethodSource(source))
185 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testDoubleSlashCommentsInParameterListAreRemoved (   self)

Definition at line 209 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testDoubleSlashCommentsInParameterListAreRemoved().

210  source = """
211 class Foo {
212  public:
213  virtual void Bar(int a, // inline comments should be elided.
214  int b // inline comments should be elided.
215  ) const = 0;
216 };
217 """
219  'MOCK_CONST_METHOD2(Bar,\nvoid(int a, int b));',
220  self.GenerateMethodSource(source))
221 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testDoubleSlashCommentsInParameterListAreRemoved (   self)

Definition at line 209 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testDoubleSlashCommentsInParameterListAreRemoved().

210  source = """
211 class Foo {
212  public:
213  virtual void Bar(int a, // inline comments should be elided.
214  int b // inline comments should be elided.
215  ) const = 0;
216 };
217 """
219  'MOCK_CONST_METHOD2(Bar,\nvoid(int a, int b));',
220  self.GenerateMethodSource(source))
221 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testDoubleSlashCommentsInParameterListAreRemoved (   self)

Definition at line 209 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testDoubleSlashCommentsInParameterListAreRemoved().

210  source = """
211 class Foo {
212  public:
213  virtual void Bar(int a, // inline comments should be elided.
214  int b // inline comments should be elided.
215  ) const = 0;
216 };
217 """
219  'MOCK_CONST_METHOD2(Bar,\nvoid(int a, int b));',
220  self.GenerateMethodSource(source))
221 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testExplicitlyDefaultedConstructorsAndDestructor (   self)

Definition at line 98 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testExplicitlyDefaultedConstructorsAndDestructor().

99  source = """
100 class Foo {
101  public:
102  Foo() = default;
103  Foo(const Foo& f) = default;
104  Foo(Foo&& f) = default;
105  ~Foo() = default;
106  virtual int Bar() = 0;
107 };
108 """
109  # The constructors and destructor should be ignored.
111  'MOCK_METHOD0(Bar,\nint());',
112  self.GenerateMethodSource(source))
113 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testExplicitlyDefaultedConstructorsAndDestructor (   self)

Definition at line 98 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testExplicitlyDefaultedConstructorsAndDestructor().

99  source = """
100 class Foo {
101  public:
102  Foo() = default;
103  Foo(const Foo& f) = default;
104  Foo(Foo&& f) = default;
105  ~Foo() = default;
106  virtual int Bar() = 0;
107 };
108 """
109  # The constructors and destructor should be ignored.
111  'MOCK_METHOD0(Bar,\nint());',
112  self.GenerateMethodSource(source))
113 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testExplicitlyDefaultedConstructorsAndDestructor (   self)

Definition at line 98 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testExplicitlyDefaultedConstructorsAndDestructor().

99  source = """
100 class Foo {
101  public:
102  Foo() = default;
103  Foo(const Foo& f) = default;
104  Foo(Foo&& f) = default;
105  ~Foo() = default;
106  virtual int Bar() = 0;
107 };
108 """
109  # The constructors and destructor should be ignored.
111  'MOCK_METHOD0(Bar,\nint());',
112  self.GenerateMethodSource(source))
113 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testExplicitlyDeletedConstructorsAndDestructor (   self)

Definition at line 114 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testExplicitlyDeletedConstructorsAndDestructor().

115  source = """
116 class Foo {
117  public:
118  Foo() = delete;
119  Foo(const Foo& f) = delete;
120  Foo(Foo&& f) = delete;
121  ~Foo() = delete;
122  virtual int Bar() = 0;
123 };
124 """
125  # The constructors and destructor should be ignored.
127  'MOCK_METHOD0(Bar,\nint());',
128  self.GenerateMethodSource(source))
129 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testExplicitlyDeletedConstructorsAndDestructor (   self)

Definition at line 114 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testExplicitlyDeletedConstructorsAndDestructor().

115  source = """
116 class Foo {
117  public:
118  Foo() = delete;
119  Foo(const Foo& f) = delete;
120  Foo(Foo&& f) = delete;
121  ~Foo() = delete;
122  virtual int Bar() = 0;
123 };
124 """
125  # The constructors and destructor should be ignored.
127  'MOCK_METHOD0(Bar,\nint());',
128  self.GenerateMethodSource(source))
129 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testExplicitlyDeletedConstructorsAndDestructor (   self)

Definition at line 114 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testExplicitlyDeletedConstructorsAndDestructor().

115  source = """
116 class Foo {
117  public:
118  Foo() = delete;
119  Foo(const Foo& f) = delete;
120  Foo(Foo&& f) = delete;
121  ~Foo() = delete;
122  virtual int Bar() = 0;
123 };
124 """
125  # The constructors and destructor should be ignored.
127  'MOCK_METHOD0(Bar,\nint());',
128  self.GenerateMethodSource(source))
129 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testExplicitVoid (   self)

Definition at line 152 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testExplicitVoid().

152  def testExplicitVoid(self):
153  source = """
154 class Foo {
155  public:
156  virtual int Bar(void);
157 };
158 """
160  'MOCK_METHOD0(Bar,\nint(void));',
161  self.GenerateMethodSource(source))
162 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testExplicitVoid (   self)

Definition at line 152 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testExplicitVoid().

152  def testExplicitVoid(self):
153  source = """
154 class Foo {
155  public:
156  virtual int Bar(void);
157 };
158 """
160  'MOCK_METHOD0(Bar,\nint(void));',
161  self.GenerateMethodSource(source))
162 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testExplicitVoid (   self)

Definition at line 152 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testExplicitVoid().

152  def testExplicitVoid(self):
153  source = """
154 class Foo {
155  public:
156  virtual int Bar(void);
157 };
158 """
160  'MOCK_METHOD0(Bar,\nint(void));',
161  self.GenerateMethodSource(source))
162 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testMultipleDefaultParameters (   self)

Definition at line 186 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testMultipleDefaultParameters().

187  source = """
188 class Foo {
189  public:
190  virtual void Bar(int a = 42, char c = 'x') = 0;
191 };
192 """
194  'MOCK_METHOD2(Bar,\nvoid(int, char));',
195  self.GenerateMethodSource(source))
196 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testMultipleDefaultParameters (   self)

Definition at line 186 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testMultipleDefaultParameters().

187  source = """
188 class Foo {
189  public:
190  virtual void Bar(int a = 42, char c = 'x') = 0;
191 };
192 """
194  'MOCK_METHOD2(Bar,\nvoid(int, char));',
195  self.GenerateMethodSource(source))
196 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testMultipleDefaultParameters (   self)

Definition at line 186 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testMultipleDefaultParameters().

187  source = """
188 class Foo {
189  public:
190  virtual void Bar(int a = 42, char c = 'x') = 0;
191 };
192 """
194  'MOCK_METHOD2(Bar,\nvoid(int, char));',
195  self.GenerateMethodSource(source))
196 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testPointerArgWithoutNames (   self)

Definition at line 284 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testPointerArgWithoutNames().

285  source = """
286 class Foo {
287  virtual int Bar(C*);
288 };
289 """
291  'MOCK_METHOD1(Bar,\nint(C*));',
292  self.GenerateMethodSource(source))
293 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testPointerArgWithoutNames (   self)

Definition at line 284 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testPointerArgWithoutNames().

285  source = """
286 class Foo {
287  virtual int Bar(C*);
288 };
289 """
291  'MOCK_METHOD1(Bar,\nint(C*));',
292  self.GenerateMethodSource(source))
293 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testPointerArgWithoutNames (   self)

Definition at line 284 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testPointerArgWithoutNames().

285  source = """
286 class Foo {
287  virtual int Bar(C*);
288 };
289 """
291  'MOCK_METHOD1(Bar,\nint(C*));',
292  self.GenerateMethodSource(source))
293 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testReferenceArgWithoutNames (   self)

Definition at line 294 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testReferenceArgWithoutNames().

295  source = """
296 class Foo {
297  virtual int Bar(C&);
298 };
299 """
301  'MOCK_METHOD1(Bar,\nint(C&));',
302  self.GenerateMethodSource(source))
303 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testReferenceArgWithoutNames (   self)

Definition at line 294 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testReferenceArgWithoutNames().

295  source = """
296 class Foo {
297  virtual int Bar(C&);
298 };
299 """
301  'MOCK_METHOD1(Bar,\nint(C&));',
302  self.GenerateMethodSource(source))
303 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testReferenceArgWithoutNames (   self)

Definition at line 294 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testReferenceArgWithoutNames().

295  source = """
296 class Foo {
297  virtual int Bar(C&);
298 };
299 """
301  'MOCK_METHOD1(Bar,\nint(C&));',
302  self.GenerateMethodSource(source))
303 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testRemovesCommentsWhenDefaultsArePresent (   self)

Definition at line 197 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testRemovesCommentsWhenDefaultsArePresent().

198  source = """
199 class Foo {
200  public:
201  virtual void Bar(int a = 42 /* a comment */,
202  char /* other comment */ c= 'x') = 0;
203 };
204 """
206  'MOCK_METHOD2(Bar,\nvoid(int, char));',
207  self.GenerateMethodSource(source))
208 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testRemovesCommentsWhenDefaultsArePresent (   self)

Definition at line 197 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testRemovesCommentsWhenDefaultsArePresent().

198  source = """
199 class Foo {
200  public:
201  virtual void Bar(int a = 42 /* a comment */,
202  char /* other comment */ c= 'x') = 0;
203 };
204 """
206  'MOCK_METHOD2(Bar,\nvoid(int, char));',
207  self.GenerateMethodSource(source))
208 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testRemovesCommentsWhenDefaultsArePresent (   self)

Definition at line 197 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testRemovesCommentsWhenDefaultsArePresent().

198  source = """
199 class Foo {
200  public:
201  virtual void Bar(int a = 42 /* a comment */,
202  char /* other comment */ c= 'x') = 0;
203 };
204 """
206  'MOCK_METHOD2(Bar,\nvoid(int, char));',
207  self.GenerateMethodSource(source))
208 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testReturnTypeWithManyTemplateArgs (   self)

Definition at line 257 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testReturnTypeWithManyTemplateArgs().

258  source = """
259 class Foo {
260  public:
261  virtual map<int, string> Bar();
262 };"""
263  # Comparing the comment text is brittle - we'll think of something
264  # better in case this gets annoying, but for now let's keep it simple.
266  '// The following line won\'t really compile, as the return\n'
267  '// type has multiple template arguments. To fix it, use a\n'
268  '// typedef for the return type.\n'
269  'MOCK_METHOD0(Bar,\nmap<int, string>());',
270  self.GenerateMethodSource(source))
271 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testReturnTypeWithManyTemplateArgs (   self)

Definition at line 257 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testReturnTypeWithManyTemplateArgs().

258  source = """
259 class Foo {
260  public:
261  virtual map<int, string> Bar();
262 };"""
263  # Comparing the comment text is brittle - we'll think of something
264  # better in case this gets annoying, but for now let's keep it simple.
266  '// The following line won\'t really compile, as the return\n'
267  '// type has multiple template arguments. To fix it, use a\n'
268  '// typedef for the return type.\n'
269  'MOCK_METHOD0(Bar,\nmap<int, string>());',
270  self.GenerateMethodSource(source))
271 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testReturnTypeWithManyTemplateArgs (   self)

Definition at line 257 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testReturnTypeWithManyTemplateArgs().

258  source = """
259 class Foo {
260  public:
261  virtual map<int, string> Bar();
262 };"""
263  # Comparing the comment text is brittle - we'll think of something
264  # better in case this gets annoying, but for now let's keep it simple.
266  '// The following line won\'t really compile, as the return\n'
267  '// type has multiple template arguments. To fix it, use a\n'
268  '// typedef for the return type.\n'
269  'MOCK_METHOD0(Bar,\nmap<int, string>());',
270  self.GenerateMethodSource(source))
271 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testReturnTypeWithOneTemplateArg (   self)

Definition at line 247 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testReturnTypeWithOneTemplateArg().

248  source = """
249 class Foo {
250  public:
251  virtual vector<int>* Bar(int n);
252 };"""
254  'MOCK_METHOD1(Bar,\nvector<int>*(int n));',
255  self.GenerateMethodSource(source))
256 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testReturnTypeWithOneTemplateArg (   self)

Definition at line 247 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testReturnTypeWithOneTemplateArg().

248  source = """
249 class Foo {
250  public:
251  virtual vector<int>* Bar(int n);
252 };"""
254  'MOCK_METHOD1(Bar,\nvector<int>*(int n));',
255  self.GenerateMethodSource(source))
256 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testReturnTypeWithOneTemplateArg (   self)

Definition at line 247 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testReturnTypeWithOneTemplateArg().

248  source = """
249 class Foo {
250  public:
251  virtual vector<int>* Bar(int n);
252 };"""
254  'MOCK_METHOD1(Bar,\nvector<int>*(int n));',
255  self.GenerateMethodSource(source))
256 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testSimpleConstMethod (   self)

Definition at line 141 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testSimpleConstMethod().

142  source = """
143 class Foo {
144  public:
145  virtual void Bar(bool flag) const;
146 };
147 """
149  'MOCK_CONST_METHOD1(Bar,\nvoid(bool flag));',
150  self.GenerateMethodSource(source))
151 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testSimpleConstMethod (   self)

Definition at line 141 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testSimpleConstMethod().

142  source = """
143 class Foo {
144  public:
145  virtual void Bar(bool flag) const;
146 };
147 """
149  'MOCK_CONST_METHOD1(Bar,\nvoid(bool flag));',
150  self.GenerateMethodSource(source))
151 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testSimpleConstMethod (   self)

Definition at line 141 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testSimpleConstMethod().

142  source = """
143 class Foo {
144  public:
145  virtual void Bar(bool flag) const;
146 };
147 """
149  'MOCK_CONST_METHOD1(Bar,\nvoid(bool flag));',
150  self.GenerateMethodSource(source))
151 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testSimpleConstructorsAndDestructor (   self)

Definition at line 68 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testSimpleConstructorsAndDestructor().

69  source = """
70 class Foo {
71  public:
72  Foo();
73  Foo(int x);
74  Foo(const Foo& f);
75  Foo(Foo&& f);
76  ~Foo();
77  virtual int Bar() = 0;
78 };
79 """
80  # The constructors and destructor should be ignored.
82  'MOCK_METHOD0(Bar,\nint());',
83  self.GenerateMethodSource(source))
84 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testSimpleConstructorsAndDestructor (   self)

Definition at line 68 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testSimpleConstructorsAndDestructor().

69  source = """
70 class Foo {
71  public:
72  Foo();
73  Foo(int x);
74  Foo(const Foo& f);
75  Foo(Foo&& f);
76  ~Foo();
77  virtual int Bar() = 0;
78 };
79 """
80  # The constructors and destructor should be ignored.
82  'MOCK_METHOD0(Bar,\nint());',
83  self.GenerateMethodSource(source))
84 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testSimpleConstructorsAndDestructor (   self)

Definition at line 68 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testSimpleConstructorsAndDestructor().

69  source = """
70 class Foo {
71  public:
72  Foo();
73  Foo(int x);
74  Foo(const Foo& f);
75  Foo(Foo&& f);
76  ~Foo();
77  virtual int Bar() = 0;
78 };
79 """
80  # The constructors and destructor should be ignored.
82  'MOCK_METHOD0(Bar,\nint());',
83  self.GenerateMethodSource(source))
84 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testSimpleMethod (   self)

Definition at line 57 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testSimpleMethod().

57  def testSimpleMethod(self):
58  source = """
59 class Foo {
60  public:
61  virtual int Bar();
62 };
63 """
65  'MOCK_METHOD0(Bar,\nint());',
66  self.GenerateMethodSource(source))
67 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testSimpleMethod (   self)

Definition at line 57 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testSimpleMethod().

57  def testSimpleMethod(self):
58  source = """
59 class Foo {
60  public:
61  virtual int Bar();
62 };
63 """
65  'MOCK_METHOD0(Bar,\nint());',
66  self.GenerateMethodSource(source))
67 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testSimpleMethod (   self)

Definition at line 57 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testSimpleMethod().

57  def testSimpleMethod(self):
58  source = """
59 class Foo {
60  public:
61  virtual int Bar();
62 };
63 """
65  'MOCK_METHOD0(Bar,\nint());',
66  self.GenerateMethodSource(source))
67 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testSimpleMethodInTemplatedClass (   self)

Definition at line 272 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testSimpleMethodInTemplatedClass().

273  source = """
274 template<class T>
275 class Foo {
276  public:
277  virtual int Bar();
278 };
279 """
281  'MOCK_METHOD0_T(Bar,\nint());',
282  self.GenerateMethodSource(source))
283 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testSimpleMethodInTemplatedClass (   self)

Definition at line 272 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testSimpleMethodInTemplatedClass().

273  source = """
274 template<class T>
275 class Foo {
276  public:
277  virtual int Bar();
278 };
279 """
281  'MOCK_METHOD0_T(Bar,\nint());',
282  self.GenerateMethodSource(source))
283 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testSimpleMethodInTemplatedClass (   self)

Definition at line 272 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testSimpleMethodInTemplatedClass().

273  source = """
274 template<class T>
275 class Foo {
276  public:
277  virtual int Bar();
278 };
279 """
281  'MOCK_METHOD0_T(Bar,\nint());',
282  self.GenerateMethodSource(source))
283 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testSimpleOverrideMethod (   self)

Definition at line 130 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testSimpleOverrideMethod().

131  source = """
132 class Foo {
133  public:
134  int Bar() override;
135 };
136 """
138  'MOCK_METHOD0(Bar,\nint());',
139  self.GenerateMethodSource(source))
140 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testSimpleOverrideMethod (   self)

Definition at line 130 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testSimpleOverrideMethod().

131  source = """
132 class Foo {
133  public:
134  int Bar() override;
135 };
136 """
138  'MOCK_METHOD0(Bar,\nint());',
139  self.GenerateMethodSource(source))
140 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testSimpleOverrideMethod (   self)

Definition at line 130 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testSimpleOverrideMethod().

131  source = """
132 class Foo {
133  public:
134  int Bar() override;
135 };
136 """
138  'MOCK_METHOD0(Bar,\nint());',
139  self.GenerateMethodSource(source))
140 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testStrangeNewlineInParameter (   self)

Definition at line 163 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testStrangeNewlineInParameter().

164  source = """
165 class Foo {
166  public:
167  virtual void Bar(int
168 a) = 0;
169 };
170 """
172  'MOCK_METHOD1(Bar,\nvoid(int a));',
173  self.GenerateMethodSource(source))
174 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testStrangeNewlineInParameter (   self)

Definition at line 163 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testStrangeNewlineInParameter().

164  source = """
165 class Foo {
166  public:
167  virtual void Bar(int
168 a) = 0;
169 };
170 """
172  'MOCK_METHOD1(Bar,\nvoid(int a));',
173  self.GenerateMethodSource(source))
174 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testStrangeNewlineInParameter (   self)

Definition at line 163 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testStrangeNewlineInParameter().

164  source = """
165 class Foo {
166  public:
167  virtual void Bar(int
168 a) = 0;
169 };
170 """
172  'MOCK_METHOD1(Bar,\nvoid(int a));',
173  self.GenerateMethodSource(source))
174 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testVirtualDestructor (   self)

Definition at line 85 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource().

Referenced by cpp.gmock_class_test.GenerateMethodsTest.testVirtualDestructor().

86  source = """
87 class Foo {
88  public:
89  virtual ~Foo();
90  virtual int Bar() = 0;
91 };
92 """
93  # The destructor should be ignored.
95  'MOCK_METHOD0(Bar,\nint());',
96  self.GenerateMethodSource(source))
97 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testVirtualDestructor (   self)

Definition at line 85 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testVirtualDestructor().

86  source = """
87 class Foo {
88  public:
89  virtual ~Foo();
90  virtual int Bar() = 0;
91 };
92 """
93  # The destructor should be ignored.
95  'MOCK_METHOD0(Bar,\nint());',
96  self.GenerateMethodSource(source))
97 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def cpp.gmock_class_test.GenerateMethodsTest.testVirtualDestructor (   self)

Definition at line 85 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.GenerateMethodSource(), and cpp.gmock_class_test.GenerateMethodsTest.testVirtualDestructor().

86  source = """
87 class Foo {
88  public:
89  virtual ~Foo();
90  virtual int Bar() = 0;
91 };
92 """
93  # The destructor should be ignored.
95  'MOCK_METHOD0(Bar,\nint());',
96  self.GenerateMethodSource(source))
97 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)

The documentation for this class was generated from the following file: