| Index: test/cctest/test-regexp.cc
|
| diff --git a/test/cctest/test-regexp.cc b/test/cctest/test-regexp.cc
|
| index 6237c61b1338a14ffa2b83719b5567a679907509..57a7a6030b5f814ead3e86963f165d7a8cef3882 100644
|
| --- a/test/cctest/test-regexp.cc
|
| +++ b/test/cctest/test-regexp.cc
|
| @@ -56,7 +56,7 @@ static SmartPointer<const char> Parse(const char* input) {
|
| ZoneScope zone_scope(DELETE_ON_EXIT);
|
| FlatStringReader reader(CStrVector(input));
|
| RegExpParseResult result;
|
| - CHECK(v8::internal::ParseRegExp(&reader, &result));
|
| + CHECK(v8::internal::ParseRegExp(&reader, false, &result));
|
| CHECK(result.tree != NULL);
|
| CHECK(result.error.is_null());
|
| SmartPointer<const char> output = result.tree->ToString();
|
| @@ -69,7 +69,7 @@ static bool ParseEscapes(const char* input) {
|
| ZoneScope zone_scope(DELETE_ON_EXIT);
|
| FlatStringReader reader(CStrVector(input));
|
| RegExpParseResult result;
|
| - CHECK(v8::internal::ParseRegExp(&reader, &result));
|
| + CHECK(v8::internal::ParseRegExp(&reader, false, &result));
|
| CHECK(result.tree != NULL);
|
| CHECK(result.error.is_null());
|
| return result.has_character_escapes;
|
| @@ -257,7 +257,7 @@ static void ExpectError(const char* input,
|
| ZoneScope zone_scope(DELETE_ON_EXIT);
|
| FlatStringReader reader(CStrVector(input));
|
| RegExpParseResult result;
|
| - CHECK_EQ(false, v8::internal::ParseRegExp(&reader, &result));
|
| + CHECK_EQ(false, v8::internal::ParseRegExp(&reader, false, &result));
|
| CHECK(result.tree == NULL);
|
| CHECK(!result.error.is_null());
|
| SmartPointer<char> str = result.error->ToCString(ALLOW_NULLS);
|
| @@ -373,23 +373,23 @@ TEST(CharacterClassEscapes) {
|
| }
|
|
|
|
|
| -static RegExpNode* Compile(const char* input) {
|
| +static RegExpNode* Compile(const char* input, bool multiline) {
|
| FlatStringReader reader(CStrVector(input));
|
| RegExpParseResult result;
|
| - if (!v8::internal::ParseRegExp(&reader, &result))
|
| + if (!v8::internal::ParseRegExp(&reader, multiline, &result))
|
| return NULL;
|
| RegExpNode* node = NULL;
|
| - RegExpEngine::Compile(&result, &node, false);
|
| + RegExpEngine::Compile(&result, &node, false, multiline);
|
| return node;
|
| }
|
|
|
|
|
| static void Execute(const char* input,
|
| - const char* str,
|
| + bool multiline,
|
| bool dot_output = false) {
|
| v8::HandleScope scope;
|
| ZoneScope zone_scope(DELETE_ON_EXIT);
|
| - RegExpNode* node = Compile(input);
|
| + RegExpNode* node = Compile(input, multiline);
|
| USE(node);
|
| #ifdef DEBUG
|
| if (dot_output) {
|
| @@ -400,14 +400,6 @@ static void Execute(const char* input,
|
| }
|
|
|
|
|
| -TEST(Execution) {
|
| - V8::Initialize(NULL);
|
| - Execute(".*?(?:a[bc]d|e[fg]h)", "xxxabbegh");
|
| - Execute(".*?(?:a[bc]d|e[fg]h)", "xxxabbefh");
|
| - Execute(".*?(?:a[bc]d|e[fg]h)", "xxxabbefd");
|
| -}
|
| -
|
| -
|
| class TestConfig {
|
| public:
|
| typedef int Key;
|
| @@ -1043,7 +1035,7 @@ TEST(LatinCanonicalize) {
|
| TEST(SimplePropagation) {
|
| v8::HandleScope scope;
|
| ZoneScope zone_scope(DELETE_ON_EXIT);
|
| - RegExpNode* node = Compile("(a|^b|c)");
|
| + RegExpNode* node = Compile("(a|^b|c)", false);
|
| CHECK(node->info()->determine_start);
|
| }
|
|
|
| @@ -1175,5 +1167,5 @@ TEST(CharacterRangeCaseIndependence) {
|
|
|
| TEST(Graph) {
|
| V8::Initialize(NULL);
|
| - Execute("\\w+", "", true);
|
| + Execute("(?:^foo|^bar)$", false, true);
|
| }
|
|
|