js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A2.js

Wed, 31 Dec 2014 07:53:36 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:53:36 +0100
branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
permissions
-rw-r--r--

Correct small whitespace inconsistency, lost while renaming variables.

     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  * If two or more formal parameters share the same name, hence
     6  * the same property, the corresponding property is given the value that was
     7  * supplied for the last parameter with this name
     8  *
     9  * @path ch10/10.2/10.2.1/S10.2.1_A2.js
    10  * @description Creating functions initialized with two or more formal parameters, which have the same name
    11  * @noStrict
    12  */
    14 //CHECK#1
    15 function f1(x, x) {
    16   return x;
    17 }
    18 if(!(f1(1, 2) === 2)) {
    19   $ERROR("#1: f1(1, 2) === 2");
    20 }
    22 //CHECK#2
    23 function f2(x, x, x){
    24   return x*x*x;
    25 }
    26 if(!(f2(1, 2, 3) === 27)){
    27   $ERROR("f2(1, 2, 3) === 27");
    28 }
    30 //CHECK#3
    31 function f3(x, x) {
    32   return 'a' + x;
    33 }
    34 if(!(f3(1, 2) === 'a2')){
    35   $ERROR("#3: f3(1, 2) === 'a2'");
    36 }

mercurial