Debian Codegraph @

js/src/tests/test262/language/statements/throw/S12.13_A3_T1.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: 1. Evaluate Expression
6 es5id: 12.13_A3_T1
7 description: Evaluating boolean expression
8 ---*/
9
10 // CHECK#1
11 var b=true;
12 try{
13 throw b&&false;
14 }
15 catch(e){
16 if (e!==false) throw new Test262Error('#1: Exception === false(operaton &&). Actual: Exception ==='+ e );
17 }
18
19 // CHECK#2
20 var b=true;
21 try{
22 throw b||false;
23 }
24 catch(e){
25 if (e!==true) throw new Test262Error('#2: Exception === true(operaton ||). Actual: Exception ==='+ e );
26 }
27
28 // CHECK#3
29 try{
30 throw !false;
31 }
32 catch(e){
33 if (e!==true) throw new Test262Error('#3: Exception === true(operaton !). Actual: Exception ==='+ e );
34 }
35
36 // CHECK#4
37 var b=true;
38 try{
39 throw !(b&&false);
40 }
41 catch(e){
42 if (e!==true) throw new Test262Error('#4: Exception === true(operaton &&). Actual: Exception ==='+ e );
43 }
44
45 reportCompare(0, 0);