blob: bd18503e204a0a3276d9dafe5551916035fef42d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* @name: S13_A7_T1;
* @section: 13;
* @assertion: The FunctionBody must be SourceElements;
* @description: Using only SourceElements within the FunctionBody;
*/
// Converted for Test262 from original Sputnik source
ES5Harness.registerTest( {
id: "S13_A7_T1",
path: "13_Function_Definition\S13_A7_T1.js",
assertion: "The FunctionBody must be SourceElements",
description: "Using only SourceElements within the FunctionBody",
test: function testcase() {
function __func(){'ground control to major tom'};
//////////////////////////////////////////////////////////////////////////////
//CHECK#1
if (typeof __func !== "function") {
$ERROR('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func);
}
//
//////////////////////////////////////////////////////////////////////////////
function __func__2(){b};
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (typeof __func__2 !== "function") {
$ERROR('#2: typeof __func__2 === "function". Actual: typeof __func__2 ==='+typeof __func__2);
}
//
//////////////////////////////////////////////////////////////////////////////
function __func__3(){1};
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (typeof __func__3 !== "function") {
$ERROR('#3: typeof __func__3 === "function". Actual: typeof __func__3 ==='+typeof __func__3);
}
//
//////////////////////////////////////////////////////////////////////////////
function __func__4(){1+c};
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (typeof __func__4 !== "function") {
$ERROR('#4: typeof __func__4 === "function". Actual: typeof __func__4 ==='+typeof __func__4);
}
//
//////////////////////////////////////////////////////////////////////////////
function __func__5(){inc(d)};
//////////////////////////////////////////////////////////////////////////////
//CHECK#5
if (typeof __func__5 !== "function") {
$ERROR('#5: typeof __func__5 === "function". Actual: typeof __func__5 ==='+typeof __func__5);
}
//
//////////////////////////////////////////////////////////////////////////////
function __func__6(){var \u0042 = 1;};
//////////////////////////////////////////////////////////////////////////////
//CHECK#6
if (typeof __func__6 !== "function") {
$ERROR('#6: typeof __func__6 === "function". Actual: typeof __func__6 ==='+typeof __func__6);
}
//
//////////////////////////////////////////////////////////////////////////////
//function __func__7(){var \u003d = 1;};
////////////////////////////////////////////////////////////////////////////////
////CHECK#7
//if (typeof __func__7 !== "function") {
// $ERROR('#7: The FunctionBody must be SourceElements');
//}
//
//////////////////////////////////////////////////////////////////////////////
}
});
|