|
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 * Applaing negation to boolean works well |
|
6 * |
|
7 * @path ch08/8.3/S8.3_A3.js |
|
8 * @description Check not false equals true, not true equals false |
|
9 */ |
|
10 |
|
11 ////////////////////////////////////////////////////////////////////////////// |
|
12 //CHECK#1 |
|
13 if (!false !== true){ |
|
14 $ERROR('#1: !false === true'); |
|
15 } |
|
16 // |
|
17 ////////////////////////////////////////////////////////////////////////////// |
|
18 |
|
19 ////////////////////////////////////////////////////////////////////////////// |
|
20 //CHECK#2 |
|
21 if (!false != true){ |
|
22 $ERROR('#2: !false == true'); |
|
23 } |
|
24 // |
|
25 ////////////////////////////////////////////////////////////////////////////// |
|
26 |
|
27 ////////////////////////////////////////////////////////////////////////////// |
|
28 //CHECK#3 |
|
29 if (!true !== false){ |
|
30 $ERROR('#3: !true === false'); |
|
31 } |
|
32 // |
|
33 ////////////////////////////////////////////////////////////////////////////// |
|
34 |
|
35 ////////////////////////////////////////////////////////////////////////////// |
|
36 //CHECK#4 |
|
37 if (!true != false){ |
|
38 $ERROR('#4: !true == false'); |
|
39 } |
|
40 // |
|
41 ////////////////////////////////////////////////////////////////////////////// |
|
42 |