Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/compound-assignment/S11.13.2_A4.10_T1.4.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: The production x ^= y is the same as x = x ^ y
6 es5id: 11.13.2_A4.10_T1.4
7 description: Type(x) and Type(y) vary between Null and Undefined
8 ---*/
9
10 var x;
11
12 //CHECK#1
13 x = null;
14 x ^= undefined;
15 if (x !== 0) {
16 $ERROR('#1: x = null; x ^= undefined; x === 0. Actual: ' + (x));
17 }
18
19 //CHECK#2
20 x = undefined;
21 x ^= null;
22 if (x !== 0) {
23 $ERROR('#2: x = undefined; x ^= null; x === 0. Actual: ' + (x));
24 }
25
26 //CHECK#3
27 x = undefined;
28 x ^= undefined;
29 if (x !== 0) {
30 $ERROR('#3: x = undefined; x ^= undefined; x === 0. Actual: ' + (x));
31 }
32
33 //CHECK#4
34 x = null;
35 x ^= null;
36 if (x !== 0) {
37 $ERROR('#4: x = null; x ^= null; x === 0. Actual: ' + (x));
38 }