def test_last_occ_3(self): matcher = BoyerMoore("abacab") self.assertEqual(matcher.get_last_occ_table(), { 'a': 4, 'b': 5, 'c': 3 })
def test_last_occ_1(self): matcher = BoyerMoore("TEST") self.assertEqual(matcher.get_last_occ_table(), { 'E': 1, 'T': 3, 'S': 2 })
def test_last_occ_2(self): matcher = BoyerMoore("TEAMMAST") self.assertEqual(matcher.get_last_occ_table(), { 'T': 7, 'E': 1, 'A': 5, 'M': 4, 'S': 6 })