Exemplo n.º 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)
Exemplo n.º 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])
Exemplo n.º 3
0
 def test_diff_bad(self):
     diff = Diff(self.DIFF_BAD)
     self.assertEqual(diff.comments, [])
Exemplo n.º 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 */"])
Exemplo n.º 5
0
 def test_diff_inline_block(self):
     diff = Diff(self.DIFF_INLINE_BLOCK)
     self.assertEqual(diff.comments, ["/* updated block comment */"])
Exemplo n.º 6
0
 def test_diff_inline(self):
     diff = Diff(self.DIFF_INLINE)
     self.assertEqual(diff.comments, ["// updated inline comment"])
Exemplo n.º 7
0
 def test_diff_block(self):
     diff = Diff(self.DIFF_SINGLE)
     self.assertEqual(diff.comments,
                      ["// Updated single Line Comment in C++"])
Exemplo n.º 8
0
 def test_diff_inst(self):
     diff = Diff(self.DIFF_STD)
     self.assertEqual(diff.diff, self.DIFF_STD)