S13_A12_T1.js (973B)
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: Function declarations in global or function scope are {DontDelete} 6 es5id: 13_A12_T1 7 description: > 8 Checking if deleting a function that is declared in global scope 9 fails 10 flags: [noStrict] 11 ---*/ 12 13 ALIVE="Letov is alive" 14 15 function __func(){ 16 return ALIVE; 17 }; 18 19 ////////////////////////////////////////////////////////////////////////////// 20 //CHECK#1 21 if (delete __func) { 22 throw new Test262Error('#1: delete __func returning false'); 23 } 24 // 25 ////////////////////////////////////////////////////////////////////////////// 26 27 ////////////////////////////////////////////////////////////////////////////// 28 //CHECK#2 29 if (__func() !== ALIVE) { 30 throw new Test262Error('#2: __func() === ALIVE. Actual: __func() ==='+__func()); 31 } 32 // 33 ////////////////////////////////////////////////////////////////////////////// 34 35 reportCompare(0, 0);