tor-browser

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

S7.9_A5.9_T1.js (1230B)


      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: |
      6    Additive/Substract Operator(A/SO) in combination with itself separated by LT or white spaces
      7    after automatic semicolon insertion gives valid result
      8 es5id: 7.9_A5.9_T1
      9 description: >
     10    Try use Variable1 (different combinations of three +) Variable2
     11    construction
     12 ---*/
     13 
     14 var x=1, y=1;
     15 var z=
     16 x
     17 +
     18 +
     19 +
     20 y
     21 
     22 //////////////////////////////////////////////////////////////////////////////
     23 //CHECK#1
     24 if ((z!==2)&&(y!==1)&&(x!==1)) {
     25 throw new Test262Error('#1: ');
     26 }
     27 //
     28 //////////////////////////////////////////////////////////////////////////////
     29 
     30 z=
     31 x + + + y
     32 
     33 //////////////////////////////////////////////////////////////////////////////
     34 //CHECK#2
     35 if ((z!==2)&&(y!==1)&&(x!==1)) {
     36 throw new Test262Error('');
     37 }
     38 //
     39 //////////////////////////////////////////////////////////////////////////////
     40 
     41 z=
     42 x
     43 +    +
     44 +    +
     45 y
     46 
     47 //////////////////////////////////////////////////////////////////////////////
     48 //CHECK#3
     49 if ((z!==2)&&(y!==1)&&(x!==1)) {
     50 throw new Test262Error('');
     51 }
     52 //
     53 //////////////////////////////////////////////////////////////////////////////
     54 
     55 reportCompare(0, 0);