tor-browser

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

S13.2.1_A6_T4.js (810B)


      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_T2
      7 description: Declaring a function with "__func = function(arg1, arg2)"
      8 ---*/
      9 
     10 var __func, y, b;
     11 
     12 __func = function(arg1, arg2){
     13    arg1++;
     14    arg2+="BA";
     15 };
     16 
     17 var x=1;
     18 y=2;
     19 var a="AB"
     20 b="SAM";
     21 
     22 __func(x,a);
     23 __func(y,b);
     24 
     25 //////////////////////////////////////////////////////////////////////////////
     26 //CHECK#1
     27 if (x!==1 || y!==2 || a!=="AB" || b!=="SAM") {
     28 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);
     29 }
     30 //
     31 //////////////////////////////////////////////////////////////////////////////
     32 
     33 reportCompare(0, 0);