Lines Matching refs:function
33 n1.toISOString = function () { return "foo"; };
37 assertThrows(function () { n2.toJSON(); }, TypeError);
39 n4.toISOString = function () {
49 //Test Date.prototype.toJSON as generic function.
51 toISOString: function() { return 42; }};
55 valueOf: function() { return Infinity; },
56 toISOString: function() { return 42; }};
61 toString: function() { return Infinity; },
62 toISOString: function() { return 42; }};
69 toISOString: function() { return 42; }};
74 toString: function() { return "Infinity"; },
75 toISOString: function() { return 42; }};
79 toISOString: function() { return ["not primitive"]; }};
132 function GetFilter(name) {
133 function Filter(key, value) {
147 function DoubleNumbers(key, value) {
157 function TestInvalid(str) {
158 assertThrows(function () { JSON.parse(str); }, SyntaxError);
165 TestInvalid('function () { return 0; }');
231 assertEquals("false", JSON.stringify({toJSON: function () { return false; }}));
263 assertThrows(function () { JSON.stringify(circular); }, TypeError);
278 checker.toJSON = function(key) { return 1 + key; };
291 function newx(k, v) { return (k == "x") ? new v(42) : v; }
297 assertEquals(undefined, JSON.stringify(function () { }));
298 // Arrays with missing, undefined or function elements have those elements
301 JSON.stringify([undefined,,function(){}]));
303 // Objects with undefined or function properties (including replaced properties)
306 JSON.stringify({a: undefined, b: function(){}, c: 42, d: 42},
307 function(k, v) { if (k == "c") return undefined;
308 if (k == "d") return function(){};
318 var o = { toString: function() { return "42"; } };
326 // Following the ES5 specification of the abstraction function Quote.
353 num37.valueOf = function() { return 37; };
357 numFoo.toString = function() { return "foo"; };
360 numTrue.valueOf = function() { return true; }
363 strFoo.toString = function() { return "foo"; };
367 str37.valueOf = function() { return 37; };
370 strTrue.toString = function() { return true; }
372 var func = function() { /* Is callable */ };
374 var funcJSON = function() { /* Is callable */ };
375 funcJSON.toJSON = function() { return "has toJSON"; };
380 reJSON.toJSON = function() { return "has toJSON"; };
390 oddball.__proto__ = { __proto__: null, toString: function() { return true; } };
396 return function() { callCount++;
409 valueOf: function() { return true; } };
411 toJSON: function () { return oddball3; } }
417 falseNum.toString = function() { return 42; };