|
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 * The initial value of the created property callee is the |
|
6 * Function object being executed |
|
7 * |
|
8 * @path ch10/10.6/S10.6_A4.js |
|
9 * @description Checking that arguments.callee === function object |
|
10 * @noStrict |
|
11 */ |
|
12 |
|
13 //CHECK#1 |
|
14 function f1(){ |
|
15 return arguments.callee; |
|
16 } |
|
17 |
|
18 try{ |
|
19 if(f1 !== f1()){ |
|
20 $ERROR('#1: arguments.callee === f1'); |
|
21 } |
|
22 } |
|
23 catch(e){ |
|
24 $ERROR("#1: arguments object doesn't exists"); |
|
25 } |
|
26 |
|
27 //CHECK#2 |
|
28 var f2 = function(){return arguments.callee;}; |
|
29 |
|
30 try{ |
|
31 if(f2 !== f2()){ |
|
32 $ERROR('#2: arguments.callee === f2'); |
|
33 } |
|
34 } |
|
35 catch(e){ |
|
36 $ERROR("#1: arguments object doesn't exists"); |
|
37 } |
|
38 |