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

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

Issue 11319: * Add support for positive lookahead assertions and negative... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/regexp2000/
Patch Set: 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
Index: test/cctest/test-regexp.cc
===================================================================
--- test/cctest/test-regexp.cc (revision 799)
+++ test/cctest/test-regexp.cc (working copy)
@@ -534,13 +534,13 @@
__ AdvanceCP(1);
__ Bind(&look_for_foo);
__ LoadCurrentChar(0, &fail);
- __ CheckChar('f', &advance);
+ __ CheckNotCharacter('f', &advance);
__ LoadCurrentChar(1, &fail);
- __ CheckChar('o', &advance);
+ __ CheckNotCharacter('o', &advance);
__ LoadCurrentChar(2, &fail);
- __ CheckChar('o', &advance);
- __ SetRegisterToCurrentPosition(0);
- __ SetRegisterToCurrentPosition(1, 2);
+ __ CheckNotCharacter('o', &advance);
+ __ WriteCurrentPositionToRegister(0);
+ __ WriteCurrentPositionToRegister(1, 2);
__ Succeed();
__ Bind(&fail);
__ Fail();
@@ -584,7 +584,7 @@
// ^
__ PushCurrentPosition();
__ PushRegister(0);
- __ SetRegisterToCurrentPosition(0);
+ __ WriteCurrentPositionToRegister(0);
__ PushBacktrack(&failure);
__ GoTo(&dot_match);
// .*
@@ -594,15 +594,15 @@
__ PushCurrentPosition();
__ PushBacktrack(&unwind_dot);
__ LoadCurrentChar(0, &foo);
- __ CheckChar('\n', &more_dots);
+ __ CheckNotCharacter('\n', &more_dots);
// foo
__ Bind(&foo);
- __ CheckChar('f', &foo_failed);
+ __ CheckNotCharacter('f', &foo_failed);
__ LoadCurrentChar(1, &foo_failed);
- __ CheckChar('o', &foo_failed);
+ __ CheckNotCharacter('o', &foo_failed);
__ LoadCurrentChar(2, &foo_failed);
- __ CheckChar('o', &foo_failed);
- __ SetRegisterToCurrentPosition(1, 2);
+ __ CheckNotCharacter('o', &foo_failed);
+ __ WriteCurrentPositionToRegister(1, 2);
__ Succeed();
__ Break();
@@ -814,5 +814,5 @@
TEST(Graph) {
V8::Initialize(NULL);
- Execute("(a|^b|c)", "", true);
+ Execute(".*o(?=o)", "", true);
}

Powered by Google App Engine
This is Rietveld 408576698