Example #1
0
 def test_diff_multiple(self):
     diff = Diff(self.DIFF_MULTIPLE)
     expected_comment = []
     expected_comment.append('/* Updated Single line block comment */')
     expected_comment.append('// Updated single Line Comment in C++')
     expected_comment.append('// updated inline comment')
     self.assertEqual(diff.comments, expected_comment)
Example #2
0
 def test_diff_multi_line_doc(self):
     diff = Diff(self.DIFF_MULTI_LINE_BLOCK)
     expected_comment = '''/* Updated multi line block comment. \n''' \
                        '''in C++\n''' \
                        '''*/'''
     self.assertEqual(diff.comments, [expected_comment])
Example #3
0
 def test_diff_bad(self):
     diff = Diff(self.DIFF_BAD)
     self.assertEqual(diff.comments, [])
Example #4
0
 def test_diff_one_line_doc(self):
     diff = Diff(self.DIFF_ONE_LINE_BLOCK)
     self.assertEqual(diff.comments,
                      ["/* Updated Single line block comment */"])
Example #5
0
 def test_diff_inline_block(self):
     diff = Diff(self.DIFF_INLINE_BLOCK)
     self.assertEqual(diff.comments, ["/* updated block comment */"])
Example #6
0
 def test_diff_inline(self):
     diff = Diff(self.DIFF_INLINE)
     self.assertEqual(diff.comments, ["// updated inline comment"])
Example #7
0
 def test_diff_block(self):
     diff = Diff(self.DIFF_SINGLE)
     self.assertEqual(diff.comments,
                      ["// Updated single Line Comment in C++"])
Example #8
0
 def test_diff_inst(self):
     diff = Diff(self.DIFF_STD)
     self.assertEqual(diff.diff, self.DIFF_STD)