Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/compound-assignment/S11.13.2_A1_T1.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_T1
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*=\u0009-1")) !== 1) {
17 $ERROR('#1: x = -1; (x\\u0009*=\\u0009-1) === 1');
18 }
19
20 //CHECK#2
21 x = -1;
22 if ((eval("x\u000B*=\u000B-1")) !== 1) {
23 $ERROR('#2: x = -1; (x\\u000B*=\\u000B-1) === 1');
24 }
25
26 //CHECK#3
27 x = -1;
28 if ((eval("x\u000C*=\u000C-1")) !== 1) {
29 $ERROR('#3: x = -1; (x\\u000C*=\\u000C-1) === 1');
30 }
31
32 //CHECK#4
33 x = -1;
34 if ((eval("x\u0020*=\u0020-1")) !== 1) {
35 $ERROR('#4: x = -1; (x\\u0020*=\\u0020-1) === 1');
36 }
37
38 //CHECK#5
39 x = -1;
40 if ((eval("x\u00A0*=\u00A0-1")) !== 1) {
41 $ERROR('#5: x = -1; (x\\u00A0*=\\u00A0-1) === 1');
42 }
43
44 //CHECK#6
45 x = -1;
46 if ((eval("x\u000A*=\u000A-1")) !== 1) {
47 $ERROR('#6: x = -1; (x\\u000A*=\\u000A-1) === 1');
48 }
49
50 //CHECK#7
51 x = -1;
52 if ((eval("x\u000D*=\u000D-1")) !== 1) {
53 $ERROR('#7: x = -1; (x\\u000D*=\\u000D-1) === 1');
54 }
55
56 //CHECK#8
57 x = -1;
58 if ((eval("x\u2028*=\u2028-1")) !== 1) {
59 $ERROR('#8: x = -1; (x\\u2028*=\\u2028-1) === 1');
60 }
61
62 //CHECK#9
63 x = -1;
64 if ((eval("x\u2029*=\u2029-1")) !== 1) {
65 $ERROR('#9: x = -1; (x\\u2029*=\\u2029-1) === 1');
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\u2029-1")) !== 1) {
72 $ERROR('#10: x = -1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029*=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-1) === 1');
73 }