summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/function/S13_A7_T1.js
blob: 556fbd5c5ad728b1cb391fa3443813cd680c41fe (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
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: The FunctionBody must be SourceElements
es5id: 13_A7_T1
description: Using only SourceElements within the FunctionBody
---*/

function __func(){'ground control to major tom'};
//////////////////////////////////////////////////////////////////////////////
//CHECK#1
if (typeof __func !== "function") {
	throw new Test262Error('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func);
}
//
//////////////////////////////////////////////////////////////////////////////

function __func__2(){b};
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (typeof __func__2 !== "function") {
	throw new Test262Error('#2: typeof __func__2 === "function". Actual: typeof __func__2 ==='+typeof __func__2);
}
//
//////////////////////////////////////////////////////////////////////////////

function __func__3(){1};
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (typeof __func__3 !== "function") {
	throw new Test262Error('#3: typeof __func__3 === "function". Actual: typeof __func__3 ==='+typeof __func__3);
}
//
//////////////////////////////////////////////////////////////////////////////

function __func__4(){1+c};
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (typeof __func__4 !== "function") {
	throw new Test262Error('#4: typeof __func__4 === "function". Actual: typeof __func__4 ==='+typeof __func__4);
}
//
//////////////////////////////////////////////////////////////////////////////

function __func__5(){inc(d)};
//////////////////////////////////////////////////////////////////////////////
//CHECK#5
if (typeof __func__5 !== "function") {
	throw new Test262Error('#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") {
	throw new Test262Error('#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") {
//	throw new Test262Error('#7: The FunctionBody must be SourceElements');
//}
//
//////////////////////////////////////////////////////////////////////////////

reportCompare(0, 0);