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

Unified Diff: test/webkit/fast/regex/quantified-assertions.js

Issue 20280003: Migrate more tests from blink repository. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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
Index: test/webkit/fast/regex/quantified-assertions.js
diff --git a/test/webkit/array-iterate-backwards.js b/test/webkit/fast/regex/quantified-assertions.js
similarity index 70%
copy from test/webkit/array-iterate-backwards.js
copy to test/webkit/fast/regex/quantified-assertions.js
index 301cbd5290c9dfafcf44c22b351483aa219212f3..966ca3258eca8ea1f157c7f79245254e82ea323e 100644
--- a/test/webkit/array-iterate-backwards.js
+++ b/test/webkit/fast/regex/quantified-assertions.js
@@ -22,34 +22,29 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
description(
-"This test checks that iterating a large array backwards works correctly."
+"This page tests assertions followed by quantifiers."
);
-var bytes = new Array();
+var regexp;
-function prepare(nbytes) {
- var i = nbytes - 1;
- while (i >= 0) {
- bytes[i] = new Number(i);
- i -= 1;
- }
-}
+regexp = /(?=a){0}/gm;
+debug("\nTesting regexp: " + regexp);
+shouldBeTrue("regexp.test('a')");
+shouldBe("regexp.lastIndex", "0");
-function verify(nbytes) {
- var i = nbytes - 1;
- while (i >= 0) {
- if (bytes[i] != i)
- return false;
- i -= 1;
- }
- return true;
-}
+regexp = /(?=a){1}/gm;
+debug("\nTesting regexp: " + regexp);
+shouldBeTrue("regexp.test('a')");
+shouldBe("regexp.lastIndex", "0");
-prepare(32768);
-shouldBeTrue('verify(32768)');
+regexp = /(?!a){0}/gm;
+debug("\nTesting regexp: " + regexp);
+shouldBeTrue("regexp.test('b')");
+shouldBe("regexp.lastIndex", "0");
-prepare(65536);
-shouldBeTrue('verify(65536)');
+regexp = /(?!a){1}/gm;
+debug("\nTesting regexp: " + regexp);
+shouldBeTrue("regexp.test('b')");
+shouldBe("regexp.lastIndex", "0");
-prepare(120000);
-shouldBeTrue('verify(120000)');
+shouldBeTrue('/^(?=a)?b$/.test("b")');
« no previous file with comments | « test/webkit/fast/regex/pcre-test-4-expected.txt ('k') | test/webkit/fast/regex/quantified-assertions-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698