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

Unified Diff: regexp2000/test/cctest/test-regexp.cc

Issue 10750: * Update to RegExp parsing and AST. (Closed)
Patch Set: Addressed review comments Created 12 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 | « regexp2000/src/regexp-macro-assembler-ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: regexp2000/test/cctest/test-regexp.cc
diff --git a/regexp2000/test/cctest/test-regexp.cc b/regexp2000/test/cctest/test-regexp.cc
index de2a1911b77f4d96b7007bc8a0d1bc4a700c0e81..d9e49c1a4e98ec91ac8017e9ba3b55730737b860 100644
--- a/regexp2000/test/cctest/test-regexp.cc
+++ b/regexp2000/test/cctest/test-regexp.cc
@@ -106,7 +106,8 @@ TEST(Parser) {
CHECK_PARSE_EQ("foo(?!bar)baz", "(: 'foo' (-> - 'bar') 'baz')");
CHECK_PARSE_EQ("()", "(^ %)");
CHECK_PARSE_EQ("(?=)", "(-> + %)");
- CHECK_PARSE_EQ("[]", "%");
+ CHECK_PARSE_EQ("[]", "^[\x00-\uffff]");
+ CHECK_PARSE_EQ("[^]", "[\x00-\uffff]");
CHECK_PARSE_EQ("[x]", "[x]");
CHECK_PARSE_EQ("[xyz]", "[x y z]");
CHECK_PARSE_EQ("[a-zA-Z0-9]", "[a-z A-Z 0-9]");
@@ -155,9 +156,11 @@ TEST(Parser) {
"(: (^ 'x') (^ 'x') (^ 'x') (^ 'x') (^ 'x') (^ 'x')"
" (^ 'x') (^ 'x') (^ 'x') (^ 'x') '\x09')");
CHECK_PARSE_EQ("(a)\\1", "(: (^ 'a') (<- 1))");
- CHECK_PARSE_EQ("(a\\1)", "(^ (: 'a' (<- 1)))");
- CHECK_PARSE_EQ("(\\1a)", "(^ (: (<- 1) 'a'))");
+ CHECK_PARSE_EQ("(a\\1)", "(^ 'a')");
+ CHECK_PARSE_EQ("(\\1a)", "(^ 'a')");
CHECK_PARSE_EQ("\\1(a)", "(: '\x01' (^ 'a'))");
+ CHECK_PARSE_EQ("(?!(a))\\1", "(-> - (^ 'a'))");
+ CHECK_PARSE_EQ("(?!\\1(a\\1)\\1)\\1", "(-> - (: '\x01' (^ 'a') (<- 1)))");
CHECK_PARSE_EQ("[\\0]", "[\0]");
CHECK_PARSE_EQ("[\\11]", "[\t]");
CHECK_PARSE_EQ("[\\11a]", "[\t a]");
« no previous file with comments | « regexp2000/src/regexp-macro-assembler-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698