|
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 FunctionBody must be SourceElements |
|
6 * |
|
7 * @path ch13/13.0/S13_A7_T1.js |
|
8 * @description Using only SourceElements within the FunctionBody |
|
9 */ |
|
10 |
|
11 function __func(){'ground control to major tom'}; |
|
12 ////////////////////////////////////////////////////////////////////////////// |
|
13 //CHECK#1 |
|
14 if (typeof __func !== "function") { |
|
15 $ERROR('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func); |
|
16 } |
|
17 // |
|
18 ////////////////////////////////////////////////////////////////////////////// |
|
19 |
|
20 function __func__2(){b}; |
|
21 ////////////////////////////////////////////////////////////////////////////// |
|
22 //CHECK#2 |
|
23 if (typeof __func__2 !== "function") { |
|
24 $ERROR('#2: typeof __func__2 === "function". Actual: typeof __func__2 ==='+typeof __func__2); |
|
25 } |
|
26 // |
|
27 ////////////////////////////////////////////////////////////////////////////// |
|
28 |
|
29 function __func__3(){1}; |
|
30 ////////////////////////////////////////////////////////////////////////////// |
|
31 //CHECK#3 |
|
32 if (typeof __func__3 !== "function") { |
|
33 $ERROR('#3: typeof __func__3 === "function". Actual: typeof __func__3 ==='+typeof __func__3); |
|
34 } |
|
35 // |
|
36 ////////////////////////////////////////////////////////////////////////////// |
|
37 |
|
38 function __func__4(){1+c}; |
|
39 ////////////////////////////////////////////////////////////////////////////// |
|
40 //CHECK#4 |
|
41 if (typeof __func__4 !== "function") { |
|
42 $ERROR('#4: typeof __func__4 === "function". Actual: typeof __func__4 ==='+typeof __func__4); |
|
43 } |
|
44 // |
|
45 ////////////////////////////////////////////////////////////////////////////// |
|
46 |
|
47 function __func__5(){inc(d)}; |
|
48 ////////////////////////////////////////////////////////////////////////////// |
|
49 //CHECK#5 |
|
50 if (typeof __func__5 !== "function") { |
|
51 $ERROR('#5: typeof __func__5 === "function". Actual: typeof __func__5 ==='+typeof __func__5); |
|
52 } |
|
53 // |
|
54 ////////////////////////////////////////////////////////////////////////////// |
|
55 |
|
56 function __func__6(){var \u0042 = 1;}; |
|
57 ////////////////////////////////////////////////////////////////////////////// |
|
58 //CHECK#6 |
|
59 if (typeof __func__6 !== "function") { |
|
60 $ERROR('#6: typeof __func__6 === "function". Actual: typeof __func__6 ==='+typeof __func__6); |
|
61 } |
|
62 // |
|
63 ////////////////////////////////////////////////////////////////////////////// |
|
64 |
|
65 //function __func__7(){var \u003d = 1;}; |
|
66 //////////////////////////////////////////////////////////////////////////////// |
|
67 ////CHECK#7 |
|
68 //if (typeof __func__7 !== "function") { |
|
69 // $ERROR('#7: The FunctionBody must be SourceElements'); |
|
70 //} |
|
71 // |
|
72 ////////////////////////////////////////////////////////////////////////////// |
|
73 |