Debian Codegraph @

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