js/src/tests/test262/ch13/13.0/S13_A12_T1.js

branch
TOR_BUG_3246
changeset 6
8bccb770b82d
equal deleted inserted replaced
-1:000000000000 0:ca60a264efac
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 * Function declarations in global or function scope are {DontDelete}
6 *
7 * @path ch13/13.0/S13_A12_T1.js
8 * @description Checking if deleting a function that is declared in global scope fails
9 */
10
11 ALIVE="Letov is alive"
12
13 function __func(){
14 return ALIVE;
15 };
16
17 //////////////////////////////////////////////////////////////////////////////
18 //CHECK#1
19 if (delete __func) {
20 $ERROR('#1: delete __func returning false');
21 }
22 //
23 //////////////////////////////////////////////////////////////////////////////
24
25 //////////////////////////////////////////////////////////////////////////////
26 //CHECK#2
27 if (__func() !== ALIVE) {
28 $ERROR('#2: __func() === ALIVE. Actual: __func() ==='+__func());
29 }
30 //
31 //////////////////////////////////////////////////////////////////////////////
32

mercurial