| Index: test/cctest/test-regexp.cc
|
| diff --git a/test/cctest/test-regexp.cc b/test/cctest/test-regexp.cc
|
| index 853d4f47108d5be1a49161cefb04d409812c3293..4b41309c18617a113060119a7a112aef822d13d6 100644
|
| --- a/test/cctest/test-regexp.cc
|
| +++ b/test/cctest/test-regexp.cc
|
| @@ -334,17 +334,23 @@ TEST(CharacterClassEscapes) {
|
| }
|
|
|
|
|
| -static void Execute(const char* input,
|
| - const char* str,
|
| - bool dot_output = false) {
|
| - v8::HandleScope scope;
|
| +static RegExpNode* Compile(const char* input) {
|
| unibrow::Utf8InputBuffer<> buffer(input, strlen(input));
|
| - ZoneScope zone_scope(DELETE_ON_EXIT);
|
| RegExpParseResult result;
|
| if (!v8::internal::ParseRegExp(&buffer, &result))
|
| - return;
|
| + return NULL;
|
| RegExpNode* node = NULL;
|
| RegExpEngine::Compile(&result, &node, false);
|
| + return node;
|
| +}
|
| +
|
| +
|
| +static void Execute(const char* input,
|
| + const char* str,
|
| + bool dot_output = false) {
|
| + v8::HandleScope scope;
|
| + ZoneScope zone_scope(DELETE_ON_EXIT);
|
| + RegExpNode* node = Compile(input);
|
| USE(node);
|
| #ifdef DEBUG
|
| if (dot_output) {
|
| @@ -755,6 +761,14 @@ TEST(LatinCanonicalize) {
|
| }
|
|
|
|
|
| +TEST(SimplePropagation) {
|
| + v8::HandleScope scope;
|
| + ZoneScope zone_scope(DELETE_ON_EXIT);
|
| + RegExpNode* node = Compile("(a|^b|c)");
|
| + CHECK(node->info()->determine_start);
|
| +}
|
| +
|
| +
|
| TEST(Graph) {
|
| - Execute("fo[ob]ar|[ba]z|x[yz]*", "", true);
|
| + Execute("(a|^b|c)", "", true);
|
| }
|
|
|