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

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

Issue 2636883002: [regexp] Implement regexp groups as wrapper. (Closed)
Patch Set: fix Created 3 years, 11 months 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/regexp/regexp-parser.cc ('k') | test/mjsunit/regress/regress-5845.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-regexp.cc
diff --git a/test/cctest/test-regexp.cc b/test/cctest/test-regexp.cc
index ee6a6c2ab7fc1a649371e2b7a9f809332e71a186..c5a86c13954ad32a480fd1f98006b6f8df6af514 100644
--- a/test/cctest/test-regexp.cc
+++ b/test/cctest/test-regexp.cc
@@ -199,8 +199,8 @@ void TestRegExpParser(bool lookbehind) {
CheckParseEq("xyz{1,}?", "(: 'xy' (# 1 - n 'z'))");
CheckParseEq("a\\fb\\nc\\rd\\te\\vf", "'a\\x0cb\\x0ac\\x0dd\\x09e\\x0bf'");
CheckParseEq("a\\nb\\bc", "(: 'a\\x0ab' @b 'c')");
- CheckParseEq("(?:foo)", "'foo'");
- CheckParseEq("(?: foo )", "' foo '");
+ CheckParseEq("(?:foo)", "(?: 'foo')");
+ CheckParseEq("(?: foo )", "(?: ' foo ')");
CheckParseEq("(foo|bar|baz)", "(^ (| 'foo' 'bar' 'baz'))");
CheckParseEq("foo|(bar|baz)|quux", "(| 'foo' (^ (| 'bar' 'baz')) 'quux')");
CheckParseEq("foo(?=bar)baz", "(: 'foo' (-> + 'bar') 'baz')");
@@ -294,7 +294,7 @@ void TestRegExpParser(bool lookbehind) {
CheckParseEq("(?!\\1(a\\1)\\1)\\1",
"(: (-> - (: (<- 1) (^ 'a') (<- 1))) (<- 1))");
CheckParseEq("\\1\\2(a(?:\\1(b\\1\\2))\\2)\\1",
- "(: (<- 1) (<- 2) (^ (: 'a' (^ 'b') (<- 2))) (<- 1))");
+ "(: (<- 1) (<- 2) (^ (: 'a' (?: (^ 'b')) (<- 2))) (<- 1))");
if (lookbehind) {
CheckParseEq("\\1\\2(a(?<=\\1(b\\1\\2))\\2)\\1",
"(: (<- 1) (<- 2) (^ (: 'a' (<- + (^ 'b')) (<- 2))) (<- 1))");
« no previous file with comments | « src/regexp/regexp-parser.cc ('k') | test/mjsunit/regress/regress-5845.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698