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

Unified Diff: test/mjsunit/deep-recursion.js

Issue 385006: Modify test using string slices... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/deep-recursion.js
===================================================================
--- test/mjsunit/deep-recursion.js (revision 3259)
+++ test/mjsunit/deep-recursion.js (working copy)
@@ -30,9 +30,7 @@
* cause stack overflows.
*/
-var depth = 110000;
-
-function newdeep(start) {
+function newdeep(start, depth) {
var d = start;
for (var i = 0; i < depth; i++) {
d = d + "f";
@@ -40,23 +38,27 @@
return d;
}
-var deep = newdeep("foo");
+var default_depth = 110000;
+
+var deep = newdeep("foo", default_depth);
assertEquals('f', deep[0]);
-var cmp1 = newdeep("a");
-var cmp2 = newdeep("b");
+var cmp1 = newdeep("a", default_depth);
+var cmp2 = newdeep("b", default_depth);
assertEquals(-1, cmp1.localeCompare(cmp2), "ab");
-var cmp2empty = newdeep("c");
+var cmp2empty = newdeep("c", default_depth);
assertTrue(cmp2empty.localeCompare("") > 0, "c");
-var cmp3empty = newdeep("d");
+var cmp3empty = newdeep("d", default_depth);
assertTrue("".localeCompare(cmp3empty) < 0), "d";
-var slicer = newdeep("slice");
+var slicer_depth = 1100;
-for (i = 0; i < depth + 4; i += 2) {
+var slicer = newdeep("slice", slicer_depth);
+
+for (i = 0; i < slicer_depth + 4; i += 2) {
slicer = slicer.slice(1, -1);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698