2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/licenses/publicdomain/
6 //-----------------------------------------------------------------------------
7 var BUGNUMBER = 614070;
8 var summary = 'Array.prototype.unshift without args';
10 print(BUGNUMBER + ": " + summary);
17 a.length = 4294967296;
18 assertEq([].unshift.call(a), 0);
19 assertEq(a.length, 0);
21 function testGetSet(len, expected) {
23 var a = { get length() { return len; }, set length(v) { newlen = v; } };
24 var res = [].unshift.call(a);
25 assertEq(res, expected);
26 assertEq(newlen, expected);
33 testGetSet(4294967297, 1);
34 testGetSet(-5, 4294967291);
36 /******************************************************************************/
38 if (typeof reportCompare === "function")
39 reportCompare(true, true);
41 print("All tests passed!");