blob: 257018ba3f5e399ebd56cba6a04ebfe8a4ef6b34 (
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
|
/*
* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/licenses/publicdomain/
*/
var args;
function test()
{
"use strict";
eval("args = arguments;");
var a = [];
for (var i = 0; i < 9; i++)
a.push(arguments);
return a;
}
var a = test();
assertEq(Array.isArray(a), true);
assertEq(a.length, 9);
var count = 0;
a.forEach(function(v, i) { count++; assertEq(v, args); });
assertEq(count, 9);
assertEq(Object.prototype.toString.call(args), "[object Arguments]");
assertEq(args.length, 0);
|