Chromium Code Reviews| Index: test/cctest/test-regexp.cc |
| diff --git a/test/cctest/test-regexp.cc b/test/cctest/test-regexp.cc |
| index 2e236c20f3188fcde73cc1b0a7d71cabf8cc8c18..a2ae77d9d0dac9241b7d203e47ace454851bb1dd 100644 |
| --- a/test/cctest/test-regexp.cc |
| +++ b/test/cctest/test-regexp.cc |
| @@ -160,6 +160,8 @@ static MinMaxPair CheckMinMaxMatch(const char* input) { |
| } |
| TEST(Parser) { |
| + FLAG_harmony_regexp_lookbehind = true; |
|
erikcorry
2015/11/11 15:39:04
Probably better to put this whole test in a static
Yang
2015/11/12 08:25:35
Done.
|
| + |
| CHECK_PARSE_ERROR("?"); |
| CheckParseEq("abc", "'abc'"); |
| @@ -191,6 +193,8 @@ TEST(Parser) { |
| CheckParseEq("foo|(bar|baz)|quux", "(| 'foo' (^ (| 'bar' 'baz')) 'quux')"); |
| CheckParseEq("foo(?=bar)baz", "(: 'foo' (-> + 'bar') 'baz')"); |
| CheckParseEq("foo(?!bar)baz", "(: 'foo' (-> - 'bar') 'baz')"); |
| + CheckParseEq("foo(?<=bar)baz", "(: 'foo' (<- + 'bar') 'baz')"); |
| + CheckParseEq("foo(?<!bar)baz", "(: 'foo' (<- - 'bar') 'baz')"); |
| CheckParseEq("()", "(^ %)"); |
| CheckParseEq("(?=)", "(-> + %)"); |
| CheckParseEq("[]", "^[\\x00-\\uffff]"); // Doesn't compile on windows |
| @@ -260,16 +264,17 @@ TEST(Parser) { |
| "(: (^ 'x') (^ 'x') (^ 'x') (^ 'x') (^ 'x') (^ 'x')" |
| " (^ 'x') (^ 'x') (^ 'x') (^ 'x') '\\x09')"); |
| CheckParseEq("(a)\\1", "(: (^ 'a') (<- 1))"); |
| - CheckParseEq("(a\\1)", "(^ 'a')"); |
| - CheckParseEq("(\\1a)", "(^ 'a')"); |
| + CheckParseEq("(a\\1)", "(^ (: 'a' (<- 1)))"); |
| + CheckParseEq("(\\1a)", "(^ (: (<- 1) 'a'))"); |
| CheckParseEq("(?=a)?a", "'a'"); |
| CheckParseEq("(?=a){0,10}a", "'a'"); |
| CheckParseEq("(?=a){1,10}a", "(: (-> + 'a') 'a')"); |
| CheckParseEq("(?=a){9,10}a", "(: (-> + 'a') 'a')"); |
| CheckParseEq("(?!a)?a", "'a'"); |
| - CheckParseEq("\\1(a)", "(^ 'a')"); |
| + CheckParseEq("\\1(a)", "(: (<- 1) (^ 'a'))"); |
| CheckParseEq("(?!(a))\\1", "(: (-> - (^ 'a')) (<- 1))"); |
| - CheckParseEq("(?!\\1(a\\1)\\1)\\1", "(: (-> - (: (^ 'a') (<- 1))) (<- 1))"); |
| + CheckParseEq("(?!\\1(a\\1)\\1)\\1", |
| + "(: (-> - (: (<- 1) (^ (: 'a' (<- 1))) (<- 1))) (<- 1))"); |
| CheckParseEq("[\\0]", "[\\x00]"); |
| CheckParseEq("[\\11]", "[\\x09]"); |
| CheckParseEq("[\\11a]", "[\\x09 a]"); |
| @@ -1388,7 +1393,7 @@ TEST(MacroAssembler) { |
| m.Fail(); |
| m.Bind(&start); |
| m.PushBacktrack(&fail); |
| - m.CheckNotAtStart(NULL); |
| + m.CheckNotAtStart(0, NULL); |
| m.LoadCurrentCharacter(0, NULL); |
| m.CheckNotCharacter('f', NULL); |
| m.LoadCurrentCharacter(1, NULL); |