tor-browser

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

S7.9_A5.6_T2.js (1132B)


      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    Since LineTerminator between Postfix Increment/Decrement Operator(I/DO) and operand is not allowed but
      7    between Prefix I/DO and operand admitted, Postfix I/DO in combination with prefix I/DO after automatic semicolon insertion gives valid result
      8 es5id: 7.9_A5.6_T2
      9 description: Try use Variable1 \n -- \n Variable2 construction
     10 ---*/
     11 
     12 var x=0, y=2;
     13 
     14 x
     15 --
     16 y
     17 
     18 //////////////////////////////////////////////////////////////////////////////
     19 //CHECK#1
     20 if ((x!==0)&(y!==1)) {
     21 throw new Test262Error('#1: Check Postfix Increment Operator for automatic semicolon insertion');
     22 }
     23 //
     24 //////////////////////////////////////////////////////////////////////////////
     25 
     26 x
     27 --y
     28 
     29 //////////////////////////////////////////////////////////////////////////////
     30 //CHECK#2
     31 if ((x!==0)&(y!==0)) {
     32 throw new Test262Error('#2: Check Postfix Increment Operator for automatic semicolon insertion');
     33 }
     34 //
     35 //////////////////////////////////////////////////////////////////////////////
     36 
     37 reportCompare(0, 0);