diff options
Diffstat (limited to 'js/src/tests/ecma_5/JSON/stringify-large-replacer-array.js')
-rw-r--r-- | js/src/tests/ecma_5/JSON/stringify-large-replacer-array.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/js/src/tests/ecma_5/JSON/stringify-large-replacer-array.js b/js/src/tests/ecma_5/JSON/stringify-large-replacer-array.js new file mode 100644 index 000000000..28180b4bf --- /dev/null +++ b/js/src/tests/ecma_5/JSON/stringify-large-replacer-array.js @@ -0,0 +1,26 @@ +// Any copyright is dedicated to the Public Domain. +// http://creativecommons.org/licenses/publicdomain/ + +var gTestfile = 'stringify-large-replacer-array.js'; +//----------------------------------------------------------------------------- +var BUGNUMBER = 816033; +var summary = "JSON.stringify with a large replacer array"; + +print(BUGNUMBER + ": " + summary); + +/************** + * BEGIN TEST * + **************/ + +var replacer = []; +for (var i = 0; i < 4096; i++) + replacer.push(i); + +assertEq(JSON.stringify({ "foopy": "FAIL", "4093": 17 }, replacer), '{"4093":17}'); + +/******************************************************************************/ + +if (typeof reportCompare === "function") + reportCompare(true, true); + +print("Tests complete"); |