Wed, 31 Dec 2014 07:53:36 +0100
Correct small whitespace inconsistency, lost while renaming variables.
1 // Any copyright is dedicated to the Public Domain.
2 // http://creativecommons.org/licenses/publicdomain/
4 var gTestfile = 'parse-mega-huge-array.js';
5 //-----------------------------------------------------------------------------
6 var BUGNUMBER = 667527;
7 var summary = "JSON.parse should parse arrays of essentially unlimited size";
9 print(BUGNUMBER + ": " + summary);
11 /**************
12 * BEGIN TEST *
13 **************/
15 var str = '[';
16 for (var i = 0, sz = Math.pow(2, 21); i < sz; i++)
17 str += '0,';
18 str += '0]';
20 var arr = JSON.parse(str);
21 assertEq(arr.length, Math.pow(2, 21) + 1);
23 /******************************************************************************/
25 if (typeof reportCompare === "function")
26 reportCompare(true, true);
28 print("Tests complete");