aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite/sputnik_converted/10_Execution_Contexts/10.1_Definitions/10.1.8_Arguments_Object/S10.1.8_A7.js
blob: d3f53468ff5c62b9b1fb699a0a2f4df3cc46900c (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
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
 * @name: S10.1.8_A7;
 * @section: 10.1.8;
 * @assertion: Get arguments of function;
 * @description: Use property arguments;  
*/


// Converted for Test262 from original Sputnik source

ES5Harness.registerTest( {
id: "S10.1.8_A7",

path: "TestCases/10_Execution_Contexts/10.1_Definitions/10.1.8_Arguments_Object/S10.1.8_A7.js",

assertion: "Get arguments of function",

description: "Use property arguments",

test: function testcase() {
   function f1() {
  return arguments;
}
  
//CHECK#1-5
for(var i = 1; i < 5; i++){  
if (f1(1,2,3,4,5)[i] !== (i+1))
  $ERROR("#"+i+": Returning function's arguments work wrong, f1(1,2,3,4,5)["+i+"] !== "+(i+1));
}

 }
});