Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /**
5 * The production x &= y is the same as x = x & y
6 *
7 * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.8.js
8 * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined
9 */
11 //CHECK#1
12 x = true;
13 x &= undefined;
14 if (x !== 0) {
15 $ERROR('#1: x = true; x &= undefined; x === 0. Actual: ' + (x));
16 }
18 //CHECK#2
19 x = undefined;
20 x &= true;
21 if (x !== 0) {
22 $ERROR('#2: x = undefined; x &= true; x === 0. Actual: ' + (x));
23 }
25 //CHECK#3
26 x = new Boolean(true);
27 x &= undefined;
28 if (x !== 0) {
29 $ERROR('#3: x = new Boolean(true); x &= undefined; x === 0. Actual: ' + (x));
30 }
32 //CHECK#4
33 x = undefined;
34 x &= new Boolean(true);
35 if (x !== 0) {
36 $ERROR('#4: x = undefined; x &= new Boolean(true); x === 0. Actual: ' + (x));
37 }