Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/compound-assignment/S11.13.2_A2.1_T1.11.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: Operator uses GetValue
6 es5id: 11.13.2_A2.1_T1.11
7 description: >
8 Either Type is not Reference or GetBase is not null, check
9 opeartor is "x |= y"
10 ---*/
11
12 //CHECK#1
13 var x = 0;
14 var z = (x |= 1);
15 if (z !== 1) {
16 $ERROR('#1: var x = 0; var z = (x |= 1); z === 1. Actual: ' + (z));
17 }
18
19 //CHECK#2
20 var x = 0;
21 var y = 1;
22 var z = (x |= y);
23 if (z !== 1) {
24 $ERROR('#2: var x = 0; var y = 1; var z = (x |= y); z === 1. Actual: ' + (z));
25 }