|
1 // |reftest| skip -- slow |
|
2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
3 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
4 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
6 |
|
7 //----------------------------------------------------------------------------- |
|
8 var BUGNUMBER = 322135; |
|
9 var summary = 'Array.prototype.unshift on Array with length 2^32-1'; |
|
10 var actual = 'Completed'; |
|
11 var expect = 'Completed'; |
|
12 |
|
13 printBugNumber(BUGNUMBER); |
|
14 printStatus (summary); |
|
15 |
|
16 printStatus('This bug passes if it does not cause an out of memory error'); |
|
17 printStatus('Other issues related to array length are not tested.'); |
|
18 |
|
19 var length = 4294967295; |
|
20 var array = new Array(length); |
|
21 |
|
22 try |
|
23 { |
|
24 array.unshift('Kibo'); |
|
25 } |
|
26 catch(ex) |
|
27 { |
|
28 printStatus(ex.name + ': ' + ex.message); |
|
29 } |
|
30 reportCompare(expect, actual, summary); |
|
31 |
|
32 //expect = 'Kibo'; |
|
33 //actual = array[0]; |
|
34 //reportCompare(expect, actual, summary + ': first prepended'); |
|
35 |
|
36 //expect = length; |
|
37 //actual = array.length; |
|
38 //reportCompare(expect, actual, summary + ': array length unchanged'); |