summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/array-functions-prototype-misc.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/array-functions-prototype-misc.js')
-rw-r--r--deps/v8/test/mjsunit/array-functions-prototype-misc.js40
1 files changed, 19 insertions, 21 deletions
diff --git a/deps/v8/test/mjsunit/array-functions-prototype-misc.js b/deps/v8/test/mjsunit/array-functions-prototype-misc.js
index 7ff5d4f2f5..dd95e2d266 100644
--- a/deps/v8/test/mjsunit/array-functions-prototype-misc.js
+++ b/deps/v8/test/mjsunit/array-functions-prototype-misc.js
@@ -31,13 +31,8 @@
* should work on other objects too, so we test that too.
*/
-var LARGE = 400000;
-var VERYLARGE = 4000000000;
-
-// Nicer for firefox 1.5. Unless you uncomment the following two lines,
-// smjs will appear to hang on this file.
-//var LARGE = 40000;
-//var VERYLARGE = 40000;
+var LARGE = 40000;
+var VERYLARGE = 40000;
var fourhundredth = LARGE/400;
@@ -45,7 +40,7 @@ function PseudoArray() {
};
for (var use_real_arrays = 0; use_real_arrays <= 1; use_real_arrays++) {
- var poses = [0, 140, 20000, VERYLARGE];
+ var poses = [0, 140, 20000];
var the_prototype;
var new_function;
var push_function;
@@ -252,19 +247,22 @@ for (var use_real_arrays = 0; use_real_arrays <= 1; use_real_arrays++) {
assertEquals("bar", a[2]);
// Shift.
- var baz = shift_function(a);
- assertEquals("baz", baz);
- assertEquals("boo", a[0]);
- assertEquals(pos + 3, a.length);
- assertEquals("foo", a[pos + 2]);
-
- // Slice.
- var bar = slice_function(a, 1, 0); // don't throw an exception please.
- bar = slice_function(a, 1, 2);
- assertEquals("bar", bar[0]);
- assertEquals(1, bar.length);
- assertEquals("bar", a[1]);
-
+ // Skip VERYLARGE arrays, as we removed sparse support for shift.
+ // Slice is also skipped, since it relies on the "shift" test to be run.
+ if (pos < VERYLARGE) {
+ var baz = shift_function(a);
+ assertEquals("baz", baz);
+ assertEquals("boo", a[0]);
+ assertEquals(pos + 3, a.length);
+ assertEquals("foo", a[pos + 2]);
+
+ // Slice.
+ var bar = slice_function(a, 1, 0); // don't throw an exception please.
+ bar = slice_function(a, 1, 2);
+ assertEquals("bar", bar[0]);
+ assertEquals(1, bar.length);
+ assertEquals("bar", a[1]);
+ }
}
}