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)
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])
def test_diff_bad(self): diff = Diff(self.DIFF_BAD) self.assertEqual(diff.comments, [])
def test_diff_one_line_doc(self): diff = Diff(self.DIFF_ONE_LINE_BLOCK) self.assertEqual(diff.comments, ["/* Updated Single line block comment */"])
def test_diff_inline_block(self): diff = Diff(self.DIFF_INLINE_BLOCK) self.assertEqual(diff.comments, ["/* updated block comment */"])
def test_diff_inline(self): diff = Diff(self.DIFF_INLINE) self.assertEqual(diff.comments, ["// updated inline comment"])
def test_diff_block(self): diff = Diff(self.DIFF_SINGLE) self.assertEqual(diff.comments, ["// Updated single Line Comment in C++"])
def test_diff_inst(self): diff = Diff(self.DIFF_STD) self.assertEqual(diff.diff, self.DIFF_STD)