S11.2.1_A4_T3.js (1753B)
1 // Copyright 2009 the Sputnik authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 info: Check type of various properties 6 es5id: 11.2.1_A4_T3 7 description: Checking properties of the Function object 8 ---*/ 9 10 //CHECK#1-8 11 if (typeof Function.prototype !== "function") throw new Test262Error('#1: typeof Function.prototype === "function". Actual: ' + (typeof Function.prototype )); 12 if (typeof Function['prototype'] !== "function") throw new Test262Error('#2: typeof Function["prototype"] === "function". Actual: ' + (typeof Function["prototype"] )); 13 if (typeof Function.prototype.toString !== "function") throw new Test262Error('#3: typeof Function.prototype.toString === "function". Actual: ' + (typeof Function.prototype.toString )); 14 if (typeof Function.prototype['toString'] !== "function") throw new Test262Error('#4: typeof Function.prototype["toString"] === "function". Actual: ' + (typeof Function.prototype["toString"] )); 15 if (typeof Function.prototype.length !== "number") throw new Test262Error('#5: typeof Function.prototype.length === "number". Actual: ' + (typeof Function.prototype.length )); 16 if (typeof Function.prototype['length'] !== "number") throw new Test262Error('#6: typeof Function.prototype["length"] === "number". Actual: ' + (typeof Function.prototype["length"] )); 17 if (typeof Function.prototype.valueOf !== "function") throw new Test262Error('#7: typeof Function.prototype.valueOf === "function". Actual: ' + (typeof Function.prototype.valueOf )); 18 if (typeof Function.prototype['valueOf'] !== "function") throw new Test262Error('#8: typeof Function.prototype["valueOf"] === "function". Actual: ' + (typeof Function.prototype["valueOf"] )); 19 20 reportCompare(0, 0);