1
// Any copyright is dedicated to the Public Domain.
2
// http://creativecommons.org/licenses/publicdomain/
4
var gTestfile = 'stringify-call-toJSON-once.js';
5
//-----------------------------------------------------------------------------
6
var BUGNUMBER = 584909;
7
var summary = "Stringification of Boolean/String/Number objects";
9
print(BUGNUMBER + ": " + summary);
20
return { toJSON: function() { return 17; } };
25
assertEq(JSON.stringify(obj), '{"p":{}}');
27
/******************************************************************************/
29
if (typeof reportCompare === "function")
30
reportCompare(true, true);
32
print("Tests complete");