Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/compound-assignment/S11.13.2_A1_T11.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: |
6 White Space and Line Terminator between LeftHandSideExpression and "@="
7 or between "@=" and AssignmentExpression are allowed
8 es5id: 11.13.2_A1_T11
9 description: Checking by using eval, check operator is x |= y
10 ---*/
11
12 var x;
13
14 //CHECK#1
15 x = 0;
16 if ((eval("x\u0009|=\u00091")) !== 1) {
17 $ERROR('#1: x = 0; (x\\u0009|=\\u00091) === 1');
18 }
19
20 //CHECK#2
21 x = 0;
22 if ((eval("x\u000B|=\u000B1")) !== 1) {
23 $ERROR('#2: x = 0; (x\\u000B|=\\u000B1) === 1');
24 }
25
26 //CHECK#3
27 x = 0;
28 if ((eval("x\u000C|=\u000C1")) !== 1) {
29 $ERROR('#3: x = 0; (x\\u000C|=\\u000C1) === 1');
30 }
31
32 //CHECK#4
33 x = 0;
34 if ((eval("x\u0020|=\u00201")) !== 1) {
35 $ERROR('#4: x = 0; (x\\u0020|=\\u00201) === 1');
36 }
37
38 //CHECK#5
39 x = 0;
40 if ((eval("x\u00A0|=\u00A01")) !== 1) {
41 $ERROR('#5: x = 0; (x\\u00A0|=\\u00A01) === 1');
42 }
43
44 //CHECK#6
45 x = 0;
46 if ((eval("x\u000A|=\u000A1")) !== 1) {
47 $ERROR('#6: x = 0; (x\\u000A|=\\u000A1) === 1');
48 }
49
50 //CHECK#7
51 x = 0;
52 if ((eval("x\u000D|=\u000D1")) !== 1) {
53 $ERROR('#7: x = 0; (x\\u000D|=\\u000D1) === 1');
54 }
55
56 //CHECK#8
57 x = 0;
58 if ((eval("x\u2028|=\u20281")) !== 1) {
59 $ERROR('#8: x = 0; (x\\u2028|=\\u20281) === 1');
60 }
61
62 //CHECK#9
63 x = 0;
64 if ((eval("x\u2029|=\u20291")) !== 1) {
65 $ERROR('#9: x = 0; (x\\u2029|=\\u20291) === 1');
66 }
67
68
69 //CHECK#10
70 x = 0;
71 if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029|=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 1) {
72 $ERROR('#10: x = 0; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029|=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 1');
73 }