S11.9.5_A2.4_T2.js (892B)
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: First expression is evaluated first, and then second expression 6 es5id: 11.9.5_A2.4_T2 7 description: Checking with "throw" 8 ---*/ 9 10 //CHECK#1 11 var x = function () { throw "x"; }; 12 var y = function () { throw "y"; }; 13 try { 14 x() !== y(); 15 throw new Test262Error('#1.1: var x = function () { throw "x"; }; var y = function () { throw "y"; }; x() !== y() throw "x". Actual: ' + (x() !== y())); 16 } catch (e) { 17 if (!(e !== "y")) { 18 throw new Test262Error('#1.2: First expression is evaluated first, and then second expression'); 19 } else { 20 if (e !== "x") { 21 throw new Test262Error('#1.3: var x = function () { throw "x"; }; var y = function () { throw "y"; }; x() !== y() throw "x". Actual: ' + (e)); 22 } 23 } 24 } 25 26 reportCompare(0, 0);