tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

S13.2.1_A6_T1.js (805B)


      1 // Copyright 2009 the Sputnik authors.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 info: Primitive types are passed by value
      6 es5id: 13.2.1_A6_T1
      7 description: Declaring a function with "function __func(arg1, arg2)"
      8 flags: [noStrict]
      9 ---*/
     10 
     11 function __func(arg1, arg2){
     12    arg1++;
     13    arg2+="BA";
     14 };
     15 
     16 var x=1;
     17 y=2;
     18 var a="AB"
     19 b="SAM";
     20 
     21 __func(x,a);
     22 __func(y,b);
     23 
     24 //////////////////////////////////////////////////////////////////////////////
     25 //CHECK#1
     26 if (x!==1 || y!==2 || a!=="AB" || b!=="SAM") {
     27 throw new Test262Error('#1: x === 1 and y === 2 and a === "AB" and b === "SAM". Actual: x ==='+x+' and y ==='+y+' and a ==='+a+' and b ==='+b);
     28 }
     29 //
     30 //////////////////////////////////////////////////////////////////////////////
     31 
     32 reportCompare(0, 0);