Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Unified Diff: tools/lexer_generator/automata_test.py

Issue 59603003: Experimental parser: parsing regex subexpressions (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/lexer/lexer_py.re ('k') | tools/lexer_generator/regex_lexer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer_generator/automata_test.py
diff --git a/tools/lexer_generator/automata_test.py b/tools/lexer_generator/automata_test.py
index 3e80db6247a50d8039bd9e4071a5519a7ff8aa70..c5bbb0bd26c2fc7a0fc75ac2ee448e2063dcf7f9 100644
--- a/tools/lexer_generator/automata_test.py
+++ b/tools/lexer_generator/automata_test.py
@@ -54,6 +54,7 @@ class AutomataTestCase(unittest.TestCase):
("a.?b", ["aab", "abb", "acb", "ab"], ["aaab", ""]),
("a.+b", ["aab", "abb", "acb"], ["aaac", "ab", ""]),
(".|.", ["a", "b"], ["aa", ""]),
+ ("//.", ["//a"], ["aa", ""]),
]
def test_matches(self):
@@ -84,9 +85,9 @@ class AutomataTestCase(unittest.TestCase):
dfa = dfa_from_nfa(nfa)
def verify(string, expected):
actions = list(dfa.collect_actions(string))
- assertEqual(len(expected), len(actions))
+ self.assertEqual(len(expected), len(actions))
for i, action in enumerate(actions):
- assertEqual(action[i], expected[i])
+ self.assertEqual(action[i], expected[i])
def verify_miss(string, expected):
verify(string, expected + [('MISS',)])
def verify_hit(string, expected):
« no previous file with comments | « src/lexer/lexer_py.re ('k') | tools/lexer_generator/regex_lexer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698