js/src/tests/test262/ch12/12.13/S12.13_A3_T1.js

branch
TOR_BUG_3246
changeset 6
8bccb770b82d
equal deleted inserted replaced
-1:000000000000 0:a259deb821eb
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 * 1. Evaluate Expression
6 *
7 * @path ch12/12.13/S12.13_A3_T1.js
8 * @description Evaluating boolean expression
9 */
10
11 // CHECK#1
12 var b=true;
13 try{
14 throw b&&false;
15 }
16 catch(e){
17 if (e!==false) $ERROR('#1: Exception === false(operaton &&). Actual: Exception ==='+ e );
18 }
19
20 // CHECK#2
21 var b=true;
22 try{
23 throw b||false;
24 }
25 catch(e){
26 if (e!==true) $ERROR('#2: Exception === true(operaton ||). Actual: Exception ==='+ e );
27 }
28
29 // CHECK#3
30 try{
31 throw !false;
32 }
33 catch(e){
34 if (e!==true) $ERROR('#3: Exception === true(operaton !). Actual: Exception ==='+ e );
35 }
36
37 // CHECK#4
38 var b=true;
39 try{
40 throw !(b&&false);
41 }
42 catch(e){
43 if (e!==true) $ERROR('#4: Exception === true(operaton &&). Actual: Exception ==='+ e );
44 }
45

mercurial