Пример #1
0
 def test_get_next_unescaped_char_at_pos_0(self):
     mm = MM
     pos = 0
     char = '"'
     gold = file.mmap_result(6, 6)
     output = file.get_next_unescaped_char(mm, pos, char)
     self.assertEqual(gold, output)
Пример #2
0
 def test_get_next_unescaped_char_with_char_to_escape(self):
     mm = MM
     pos = 90
     char = '"'
     gold = file.mmap_result(96, 96)
     output = file.get_next_unescaped_char(mm, pos, char)
     self.assertEqual(gold, output)
Пример #3
0
 def test_get_next_char_at_pos_gt_0(self):
     mm = MM
     pos = 1
     char = '{'
     gold = file.mmap_result(13, 13)
     output = file.get_next_char(mm, pos, char)
     self.assertEqual(gold, output)
Пример #4
0
 def test_get_prev_non_whitespace_char_at_pos_gt_0(self):
     mm = MM
     pos = 13
     gold = file.mmap_result(':', 11)
     output = file.get_prev_non_whitespace_char(mm, pos)
     self.assertEqual(gold, output)
Пример #5
0
 def test_get_next_non_whitespace_char_at_pos_0(self):
     mm = MM
     pos = 0
     gold = file.mmap_result("{", 0)
     output = file.get_next_non_whitespace_char(mm, pos)
     self.assertEqual(gold, output)