tor-browser

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

S11.8.2_A2.3_T1.js (716B)


      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: In ES5, First expression should be evaluated first.
      6 es5id: 11.8.2_A2.3_T1
      7 description: Checking that operands of a "<" evaluate left-to-right
      8 ---*/
      9 
     10 //CHECK#1
     11 var x = { valueOf: function () { throw "x"; } };
     12 var y = { valueOf: function () { throw "y"; } };
     13 try {
     14   x > y;
     15   throw new Test262Error('#1.1: Should have thrown');
     16 } catch (e) {
     17   if (e === "y") {
     18     throw new Test262Error('#1.2: First expression should be evaluated first');
     19   } else {
     20     if (e !== "x") {
     21       throw new Test262Error('#1.3: Failed with: ' + e);
     22     }
     23   }
     24 }
     25 
     26 reportCompare(0, 0);