michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: * Author: Tom Schuster michael@0: */ michael@0: michael@0: JSON.stringify(new Boolean(false), function(k, v) { michael@0: assertEq(typeof v, "object"); michael@0: }); michael@0: michael@0: assertEq(Boolean.prototype.hasOwnProperty('toJSON'), false); michael@0: michael@0: Object.prototype.toJSON = function() { return 2; }; michael@0: assertEq(JSON.stringify(new Boolean(true)), "2"); michael@0: michael@0: if (typeof reportCompare === 'function') michael@0: reportCompare(true, true);