Debian Codegraph @

js/src/tests/test262/language/statements/function/S13.2_A3.js

raw
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 info: |
6 When Function object(F) is constructed the length property of F is set to
7 the number of formal properties specified in FormalParameterList
8 es5id: 13.2_A3
9 description: >
10 Creating functions with various FormalParameterList and checking
11 their lengths
12 ---*/
13
14 function __func(){};
15
16 //////////////////////////////////////////////////////////////////////////////
17 //CHECK#1
18 if (__func.length !== 0) {
19 throw new Test262Error('#1: __func.length === 0. Actual: __func.length ==='+__func.length);
20 }
21 //
22 //////////////////////////////////////////////////////////////////////////////
23
24 function __gunc(a,b,c){};
25
26 //////////////////////////////////////////////////////////////////////////////
27 //CHECK#2
28 if (__gunc.length !== 3) {
29 throw new Test262Error('#2: __gunc.length === 3. Actual: __gunc.length ==='+__gunc.length);
30 }
31 //
32 //////////////////////////////////////////////////////////////////////////////
33
34 reportCompare(0, 0);