Debian Codegraph @

rhino/testsrc/tests/e4x/decompilation/regress-352013.js

raw symbols SCIP
1 /* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 gTestfile = 'regress-352013.js';
8
9 var BUGNUMBER = 352013;
10 var summary = 'Decompilation with new operator redeaux';
11 var actual = '';
12 var expect = '';
13
14 printBugNumber(BUGNUMBER);
15 START(summary);
16
17 var l, m, r;
18 var nTests = 0;
19
20 // ---------------------------------------------------------------
21
22 l = function () { (new x(y))[z]; };
23 expect = 'function () { (new x(y))[z]; }';
24 actual = l + '';
25 compareSource(expect, actual, inSection(++nTests) + summary);
26
27 m = function () { new (x(y))[z]; };
28 expect = 'function () { new (x(y)[z]); }';
29 actual = m + '';
30 compareSource(expect, actual, inSection(++nTests) + summary);
31
32 r = function () { new (x(y)[z]); };
33 expect = 'function () { new (x(y)[z]); }';
34 actual = r + '';
35 compareSource(expect, actual, inSection(++nTests) + summary);
36
37 // ---------------------------------------------------------------
38
39 l = function () { (new x(y)).@a; };
40 expect = 'function () { (new x(y)).@a; }';
41 actual = l + '';
42 compareSource(expect, actual, inSection(++nTests) + summary);
43
44 m = function () { new (x(y)).@a; };
45 expect = 'function () { new (x(y).@a); }';
46 actual = m + '';
47 compareSource(expect, actual, inSection(++nTests) + summary);
48
49 r = function () { new (x(y).@a); };
50 expect = 'function () { new (x(y).@a); }';
51 actual = r + '';
52 compareSource(expect, actual, inSection(++nTests) + summary);
53
54 // ---------------------------------------------------------------
55
56 l = function () { (new x(y)).@n::a; };
57 expect = 'function () { (new x(y)).@[n::a]; }';
58 actual = l + '';
59 compareSource(expect, actual, inSection(++nTests) + summary);
60
61 m = function () { new (x(y)).@n::a; };
62 expect = 'function () { new (x(y).@[n::a]); }';
63 actual = m + '';
64 compareSource(expect, actual, inSection(++nTests) + summary);
65
66 r = function () { new (x(y).@n::a); };
67 expect = 'function () { new (x(y).@[n::a]); }';
68 actual = r + '';
69 compareSource(expect, actual, inSection(++nTests) + summary);
70
71 // ---------------------------------------------------------------
72
73 l = function () { (new x(y)).n::z; };
74 expect = 'function () { (new x(y)).n::z; }';
75 actual = l + '';
76 compareSource(expect, actual, inSection(++nTests) + summary);
77
78 m = function () { new (x(y)).n::z; };
79 expect = 'function () { new (x(y).n::z); }';
80 actual = m + '';
81 compareSource(expect, actual, inSection(++nTests) + summary);
82
83 r = function () { new (x(y).n::z); };
84 expect = 'function () { new (x(y).n::z); }';
85 actual = r + '';
86 compareSource(expect, actual, inSection(++nTests) + summary);
87
88 // ---------------------------------------------------------------
89
90 l = function () { (new x(y)).n::[z]; };
91 expect = 'function () { (new x(y)).n::[z]; }';
92 actual = l + '';
93 compareSource(expect, actual, inSection(++nTests) + summary);
94
95 m = function () { new (x(y)).n::[z]; };
96 expect = 'function () { new (x(y).n::[z]); }';
97 actual = m + '';
98 compareSource(expect, actual, inSection(++nTests) + summary);
99
100 r = function () { new (x(y).n::[z]); };
101 expect = 'function () { new (x(y).n::[z]); }';
102 actual = r + '';
103 compareSource(expect, actual, inSection(++nTests) + summary);
104
105 END();