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

Public Member Functions

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

Helper class that adds assert methods.

Definition at line 34 of file gmock_class_test.py.

Member Function Documentation

def cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace (   self,
  expected_lines,
  lines 
)
Specialized assert that ignores the indent level.

Definition at line 41 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.StripLeadingWhitespace().

Referenced by cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), cpp.gmock_class_test.GenerateMethodsTest.testArgsOfTemplateTypes(), cpp.gmock_class_test.GenerateMethodsTest.testArrayArgWithoutNames(), cpp.gmock_class_test.GenerateMocksTest.testClassWithStorageSpecifierMacro(), 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.GenerateMocksTest.testNamespaces(), 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(), cpp.gmock_class_test.GenerateMocksTest.testTemplatedClass(), cpp.gmock_class_test.GenerateMocksTest.testTemplatedForwardDeclaration(), cpp.gmock_class_test.GenerateMocksTest.testTemplateInATemplateTypedef(), cpp.gmock_class_test.GenerateMocksTest.testTemplateInATemplateTypedefWithComma(), and cpp.gmock_class_test.GenerateMethodsTest.testVirtualDestructor().

41  def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines):
42  """Specialized assert that ignores the indent level."""
43  self.assertEqual(expected_lines, self.StripLeadingWhitespace(lines))
44 
45 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def StripLeadingWhitespace(self, lines)
def cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace (   self,
  expected_lines,
  lines 
)
Specialized assert that ignores the indent level.

Definition at line 41 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.TestCase.StripLeadingWhitespace().

41  def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines):
42  """Specialized assert that ignores the indent level."""
43  self.assertEqual(expected_lines, self.StripLeadingWhitespace(lines))
44 
45 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def StripLeadingWhitespace(self, lines)
def cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace (   self,
  expected_lines,
  lines 
)
Specialized assert that ignores the indent level.

Definition at line 41 of file gmock_class_test.py.

References cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.TestCase.StripLeadingWhitespace().

41  def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines):
42  """Specialized assert that ignores the indent level."""
43  self.assertEqual(expected_lines, self.StripLeadingWhitespace(lines))
44 
45 
def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines)
def StripLeadingWhitespace(self, lines)
def cpp.gmock_class_test.TestCase.StripLeadingWhitespace (   self,
  lines 
)
Strip leading whitespace in each line in 'lines'.

Definition at line 37 of file gmock_class_test.py.

References join.

Referenced by cpp.gmock_class_test.TestCase.assertEqualIgnoreLeadingWhitespace(), and cpp.gmock_class_test.TestCase.StripLeadingWhitespace().

37  def StripLeadingWhitespace(self, lines):
38  """Strip leading whitespace in each line in 'lines'."""
39  return '\n'.join([s.lstrip() for s in lines.split('\n')])
40 
def StripLeadingWhitespace(self, lines)
#define join
def cpp.gmock_class_test.TestCase.StripLeadingWhitespace (   self,
  lines 
)
Strip leading whitespace in each line in 'lines'.

Definition at line 37 of file gmock_class_test.py.

References join, and cpp.gmock_class_test.TestCase.StripLeadingWhitespace().

37  def StripLeadingWhitespace(self, lines):
38  """Strip leading whitespace in each line in 'lines'."""
39  return '\n'.join([s.lstrip() for s in lines.split('\n')])
40 
def StripLeadingWhitespace(self, lines)
#define join
def cpp.gmock_class_test.TestCase.StripLeadingWhitespace (   self,
  lines 
)
Strip leading whitespace in each line in 'lines'.

Definition at line 37 of file gmock_class_test.py.

References join, and cpp.gmock_class_test.TestCase.StripLeadingWhitespace().

37  def StripLeadingWhitespace(self, lines):
38  """Strip leading whitespace in each line in 'lines'."""
39  return '\n'.join([s.lstrip() for s in lines.split('\n')])
40 
def StripLeadingWhitespace(self, lines)
#define join

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