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

Unified Diff: test/webkit/fast/regex/overflow.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/overflow.js
diff --git a/test/webkit/legitimately-captured-argument.js b/test/webkit/fast/regex/overflow.js
similarity index 73%
copy from test/webkit/legitimately-captured-argument.js
copy to test/webkit/fast/regex/overflow.js
index a7290e5e1b0005710172a419d08f0f3f2500fdd5..825cd1d96366f57aec3c22f8ef662d41861b46e4 100644
--- a/test/webkit/legitimately-captured-argument.js
+++ b/test/webkit/fast/regex/overflow.js
@@ -21,18 +21,16 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-description(
-"Tests that using an argument as a captured variable, in the legitimate sense rather than the function.arguments sense, works as expected."
-);
+description("This test checks expressions with alternative lengths of appox. 2^31.");
-function makeCounter(x) {
- return function() {
- return ++x;
- };
-}
+var regexp1 = /(?:(?=g))|(?:m).{2147483648,}/;
+shouldBe("regexp1.exec('')", 'null');
-for (var i = 0; i < 100; ++i) {
- var counter = makeCounter(i);
- for (var j = 0; j < 10; ++j)
- shouldBe("counter()", "" + (i + j + 1));
-}
+var regexp2 = /(?:(?=g)).{2147483648,}/;
+shouldBe("regexp2.exec('')", 'null');
+
+var s3 = "&{6}u4a64YfQP{C}u88c4u5772Qu8693{4294967167}u85f2u7f3fs((uf202){4})u5bc6u1947";
+var regexp3 = new RegExp(s3, "");
+shouldBe("regexp3.exec(s3)", 'null');
+
+shouldThrow("function f() { /[^a$]{4294967295}/ }", '"SyntaxError: Invalid regular expression: number too large in {} quantifier"');
« no previous file with comments | « test/webkit/fast/regex/non-capturing-backtracking-expected.txt ('k') | test/webkit/fast/regex/overflow-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698