summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/ch11/11.2/11.2.4/S11.2.4_A1.1_T2.js
blob: 6be2a99377a5b62432a47950c7782c6bfa876ecf (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
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
 * Arguments : ()
 *
 * @path ch11/11.2/11.2.4/S11.2.4_A1.1_T2.js
 * @description Function is declared with FormalParameterList
 */

function f_arg(x,y) {
  return arguments;
}

//CHECK#1
if (f_arg().length !== 0) {
  $ERROR('#1: function f_arg(x,y) {return arguments;} f_arg().length === 0. Actual: ' + (f_arg().length));
}

//CHECK#2
if (f_arg()[0] !== undefined) {
  $ERROR('#2: function f_arg(x,y) {return arguments;} f_arg()[0] === undefined. Actual: ' + (f_arg()[0]));
}

//CHECK#3
if (f_arg.length !== 2) {
  $ERROR('#3: function f_arg(x,y) {return arguments;} f_arg.length === 2. Actual: ' + (f_arg.length));
}