js/src/tests/test262/ch11/11.2/11.2.4/S11.2.4_A1.2_T2.js

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 // Copyright 2009 the Sputnik authors.  All rights reserved.
     2 // This code is governed by the BSD license found in the LICENSE file.
     4 /**
     5  * Arguments : (ArgumentList)
     6  *
     7  * @path ch11/11.2/11.2.4/S11.2.4_A1.2_T2.js
     8  * @description Function is declared with FormalParameterList
     9  */
    11 f_arg = function(x,y) {
    12   return arguments;
    13 }
    15 //CHECK#1
    16 if (f_arg(1,2,3).length !== 3) {
    17   $ERROR('#1: f_arg = function(x,y) {return arguments;} f_arg(1,2,3).length === 3. Actual: ' + (f_arg(1,2,3).length));
    18 }
    20 //CHECK#2
    21 if (f_arg(1)[0] !== 1) {
    22   $ERROR('#1: f_arg = function(x,y) {return arguments;} f_arg(1)[0] === 1. Actual: ' + (f_arg(1)[0]));
    23 }
    25 //CHECK#3
    26 if (f_arg(1,2)[1] !== 2) {
    27   $ERROR('#3: f_arg = function(x,y) {return arguments;} f_arg(1,2)[1] === 2. Actual: ' + (f_arg(1,2)[1]));
    28 }
    30 //CHECK#4
    31 if (f_arg(1,2,3)[2] !== 3) {
    32   $ERROR('#4: f_arg = function(x,y) {return arguments;} f_arg(1,2,3)[2] === 3. Actual: ' + (f_arg(1,2,3)[2]));
    33 }
    35 //CHECK#5
    36 if (f_arg(1,2,3)[3] !== undefined) {
    37   $ERROR('#5: f_arg = function(x,y) {return arguments;} f_arg(1,2,3)[3] === undefined. Actual: ' + (f_arg(1,2,3)[3]));
    38 }
    40 //CHECK#6
    41 if (f_arg.length !== 2) {
    42   $ERROR('#6: f_arg = function(x,y) {return arguments;} f_arg.length === 2. Actual: ' + (f_arg.length));
    43 }

mercurial