Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/left-shift/S11.7.1_A2.4_T2.js

raw
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.7.1_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 $ERROR('#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 $ERROR('#1.2: First expression is evaluated first, and then second expression');
19 } else {
20 if (e !== "x") {
21 $ERROR('#1.3: var x = function () { throw "x"; }; var y = function () { throw "y"; }; x() << y() throw "x". Actual: ' + (e));
22 }
23 }
24 }