2011-09-07 08:35:18 +02:00
|
|
|
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
2014-07-22 01:09:02 +02:00
|
|
|
/*---
|
|
|
|
info: "Arguments : (ArgumentList)"
|
2014-07-25 00:41:42 +02:00
|
|
|
es5id: 11.2.4_A1.2_T1
|
2014-07-22 01:09:02 +02:00
|
|
|
description: Function is declared with no FormalParameterList
|
|
|
|
---*/
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2014-08-05 17:38:52 +02:00
|
|
|
var f_arg = function() {
|
2011-09-07 08:35:18 +02:00
|
|
|
return arguments;
|
|
|
|
}
|
|
|
|
|
|
|
|
//CHECK#1
|
|
|
|
if (f_arg(1,2,3).length !== 3) {
|
2021-07-28 22:48:39 +02:00
|
|
|
throw new Test262Error('#1: f_arg = function()() {return arguments;} f_arg(1,2,3).length === 3. Actual: ' + (f_arg(1,2,3).length));
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//CHECK#2
|
|
|
|
if (f_arg(1,2,3)[0] !== 1) {
|
2021-07-28 22:48:39 +02:00
|
|
|
throw new Test262Error('#1: f_arg = function()() {return arguments;} f_arg(1,2,3)[0] === 1. Actual: ' + (f_arg(1,2,3)[0]));
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//CHECK#3
|
|
|
|
if (f_arg(1,2,3)[1] !== 2) {
|
2021-07-28 22:48:39 +02:00
|
|
|
throw new Test262Error('#3: f_arg = function()() {return arguments;} f_arg(1,2,3)[1] === 2. Actual: ' + (f_arg(1,2,3)[1]));
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//CHECK#4
|
|
|
|
if (f_arg(1,2,3)[2] !== 3) {
|
2021-07-28 22:48:39 +02:00
|
|
|
throw new Test262Error('#4: f_arg = function()() {return arguments;} f_arg(1,2,3)[2] === 3. Actual: ' + (f_arg(1,2,3)[2]));
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//CHECK#5
|
|
|
|
if (f_arg(1,2,3)[3] !== undefined) {
|
2021-07-28 22:48:39 +02:00
|
|
|
throw new Test262Error('#5: f_arg = function()() {return arguments;} f_arg(1,2,3)[3] === undefined. Actual: ' + (f_arg(1,2,3)[3]));
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|