S13_A1.js (1041B)
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: | 6 "x=function y(){}" statement does not store a reference to the new 7 function in the varaible y(Identifier) 8 es5id: 13_A1 9 description: Checking the type of y 10 ---*/ 11 12 var __func = function __exp__func(){return 0;}; 13 14 //////////////////////////////////////////////// 15 // ////////////////////////////// 16 //CHECK#1 17 if (typeof __func !== "function") { 18 throw new Test262Error('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func); 19 } 20 // 21 ////////////////////////////////////////////////////////////////////////////// 22 23 24 25 ////////////////////////////////////////////////////////////////////////////// 26 //CHECK#2 27 if (typeof __exp__func !== "undefined"){ 28 throw new Test262Error('#2: typeof __exp__func === "undefined". Actual: typeof __exp__func ==='+typeof __exp__func); 29 } 30 // 31 ////////////////////////////////////////////////////////////////////////////// 32 33 reportCompare(0, 0);