Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(703)

Side by Side Diff: test/codegen_expected/language/library_prefixes_test.js

Issue 2234343003: fix #620, infer the input files from sources (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: fix Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 //FAILED TO COMPILE 1 dart_library.library('language/library_prefixes_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__library_prefixes_test(exports, dart_sdk, expect) {
5 'use strict';
6 const core = dart_sdk.core;
7 const dart = dart_sdk.dart;
8 const dartx = dart_sdk.dartx;
9 const expect$ = expect.expect;
10 const library_prefixes_test = Object.create(null);
11 const library_prefixes = Object.create(null);
12 const library_prefixes_test1 = Object.create(null);
13 const library_prefixes_test2 = Object.create(null);
14 let dynamicAnddynamicTodynamic = () => (dynamicAnddynamicTodynamic = dart.cons tFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic])))();
15 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
16 library_prefixes_test.LibraryPrefixesTest = class LibraryPrefixesTest extends core.Object {
17 static testMain() {
18 library_prefixes.LibraryPrefixes.main(dart.fn((a, b) => {
19 expect$.Expect.equals(a, b);
20 }, dynamicAnddynamicTodynamic()));
21 }
22 };
23 dart.setSignature(library_prefixes_test.LibraryPrefixesTest, {
24 statics: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}),
25 names: ['testMain']
26 });
27 library_prefixes_test.main = function() {
28 library_prefixes_test.LibraryPrefixesTest.testMain();
29 };
30 dart.fn(library_prefixes_test.main, VoidTodynamic());
31 let const$;
32 let const$0;
33 let const$1;
34 let const$2;
35 let const$3;
36 let const$4;
37 let const$5;
38 let const$6;
39 library_prefixes.LibraryPrefixes = class LibraryPrefixes extends core.Object {
40 static main(expectEquals) {
41 let a = library_prefixes_test1.Constants.PI;
42 let b = library_prefixes_test2.Constants.PI;
43 dart.dcall(expectEquals, 3.14, a);
44 dart.dcall(expectEquals, 3.14, b);
45 dart.dcall(expectEquals, 1, library_prefixes_test1.Constants.foo);
46 dart.dcall(expectEquals, 2, library_prefixes_test2.Constants.foo);
47 dart.dcall(expectEquals, -1, library_prefixes_test1.A.y);
48 dart.dcall(expectEquals, 0, library_prefixes_test2.A.y);
49 dart.dcall(expectEquals, 1, new library_prefixes_test1.A().x);
50 dart.dcall(expectEquals, 2, new library_prefixes_test2.A().x);
51 dart.dcall(expectEquals, 3, new library_prefixes_test1.A.named().x);
52 dart.dcall(expectEquals, 4, new library_prefixes_test2.A.named().x);
53 dart.dcall(expectEquals, 3, library_prefixes_test1.A.fac().x);
54 dart.dcall(expectEquals, 4, library_prefixes_test2.A.fac().x);
55 dart.dcall(expectEquals, 1, new library_prefixes_test1.B().x);
56 dart.dcall(expectEquals, 2, new library_prefixes_test2.B().x);
57 dart.dcall(expectEquals, 8, new library_prefixes_test1.B.named().x);
58 dart.dcall(expectEquals, 13, new library_prefixes_test2.B.named().x);
59 dart.dcall(expectEquals, 8, library_prefixes_test1.B.fac().x);
60 dart.dcall(expectEquals, 13, library_prefixes_test2.B.fac().x);
61 dart.dcall(expectEquals, 1, (const$ || (const$ = dart.const(new library_pr efixes_test1.C()))).x);
62 dart.dcall(expectEquals, 2, (const$0 || (const$0 = dart.const(new library_ prefixes_test2.C()))).x);
63 dart.dcall(expectEquals, 3, (const$1 || (const$1 = dart.const(new library_ prefixes_test1.C.named()))).x);
64 dart.dcall(expectEquals, 4, (const$2 || (const$2 = dart.const(new library_ prefixes_test2.C.named()))).x);
65 dart.dcall(expectEquals, 3, library_prefixes_test1.C.fac().x);
66 dart.dcall(expectEquals, 4, library_prefixes_test2.C.fac().x);
67 dart.dcall(expectEquals, 1, (const$3 || (const$3 = dart.const(new library_ prefixes_test1.D()))).x);
68 dart.dcall(expectEquals, 2, (const$4 || (const$4 = dart.const(new library_ prefixes_test2.D()))).x);
69 dart.dcall(expectEquals, 8, (const$5 || (const$5 = dart.const(new library_ prefixes_test1.D.named()))).x);
70 dart.dcall(expectEquals, 13, (const$6 || (const$6 = dart.const(new library _prefixes_test2.D.named()))).x);
71 dart.dcall(expectEquals, 8, library_prefixes_test1.D.fac().x);
72 dart.dcall(expectEquals, 13, library_prefixes_test2.D.fac().x);
73 dart.dcall(expectEquals, 0, library_prefixes_test1.E.foo());
74 dart.dcall(expectEquals, 3, library_prefixes_test2.E.foo());
75 dart.dcall(expectEquals, 1, new library_prefixes_test1.E().bar());
76 dart.dcall(expectEquals, 4, new library_prefixes_test2.E().bar());
77 dart.dcall(expectEquals, 9, dart.dcall(new library_prefixes_test1.E().toto (7)));
78 dart.dcall(expectEquals, 16, dart.dcall(new library_prefixes_test2.E().tot o(11)));
79 dart.dcall(expectEquals, 111, dart.dcall(new library_prefixes_test1.E.fun( 100).f));
80 dart.dcall(expectEquals, 1313, dart.dcall(new library_prefixes_test2.E.fun (1300).f));
81 dart.dcall(expectEquals, 999, dart.dcall(library_prefixes_test1.E.fooo(900 )));
82 dart.dcall(expectEquals, 2048, dart.dcall(library_prefixes_test2.E.fooo(10 24)));
83 }
84 };
85 dart.setSignature(library_prefixes.LibraryPrefixes, {
86 statics: () => ({main: dart.definiteFunctionType(dart.void, [dart.dynamic])} ),
87 names: ['main']
88 });
89 library_prefixes_test1.Constants = class Constants extends core.Object {};
90 library_prefixes_test1.Constants.PI = 3.14;
91 library_prefixes_test1.Constants.foo = 1;
92 library_prefixes_test1.A = class A extends core.Object {
93 new() {
94 this.x = 1;
95 }
96 named() {
97 this.x = 3;
98 }
99 superC(x) {
100 this.x = core.int._check(dart.dsend(x, '+', 7));
101 }
102 static fac() {
103 return new library_prefixes_test1.A.named();
104 }
105 };
106 dart.defineNamedConstructor(library_prefixes_test1.A, 'named');
107 dart.defineNamedConstructor(library_prefixes_test1.A, 'superC');
108 dart.setSignature(library_prefixes_test1.A, {
109 constructors: () => ({
110 new: dart.definiteFunctionType(library_prefixes_test1.A, []),
111 named: dart.definiteFunctionType(library_prefixes_test1.A, []),
112 superC: dart.definiteFunctionType(library_prefixes_test1.A, [dart.dynamic] ),
113 fac: dart.definiteFunctionType(library_prefixes_test1.A, [])
114 })
115 });
116 library_prefixes_test1.A.y = -1;
117 library_prefixes_test1.B = class B extends library_prefixes_test1.A {
118 new() {
119 super.new();
120 }
121 named() {
122 super.superC(1);
123 }
124 static fac() {
125 return new library_prefixes_test1.B.named();
126 }
127 };
128 dart.defineNamedConstructor(library_prefixes_test1.B, 'named');
129 dart.setSignature(library_prefixes_test1.B, {
130 constructors: () => ({
131 new: dart.definiteFunctionType(library_prefixes_test1.B, []),
132 named: dart.definiteFunctionType(library_prefixes_test1.B, []),
133 fac: dart.definiteFunctionType(library_prefixes_test1.B, [])
134 })
135 });
136 let const$7;
137 library_prefixes_test1.C = class C extends core.Object {
138 new() {
139 this.x = 1;
140 }
141 named() {
142 this.x = 3;
143 }
144 superC(x) {
145 this.x = core.int._check(dart.dsend(x, '+', 7));
146 }
147 static fac() {
148 return const$7 || (const$7 = dart.const(new library_prefixes_test1.C.named ()));
149 }
150 };
151 dart.defineNamedConstructor(library_prefixes_test1.C, 'named');
152 dart.defineNamedConstructor(library_prefixes_test1.C, 'superC');
153 dart.setSignature(library_prefixes_test1.C, {
154 constructors: () => ({
155 new: dart.definiteFunctionType(library_prefixes_test1.C, []),
156 named: dart.definiteFunctionType(library_prefixes_test1.C, []),
157 superC: dart.definiteFunctionType(library_prefixes_test1.C, [dart.dynamic] ),
158 fac: dart.definiteFunctionType(library_prefixes_test1.C, [])
159 })
160 });
161 let const$8;
162 library_prefixes_test1.D = class D extends library_prefixes_test1.C {
163 new() {
164 super.new();
165 }
166 named() {
167 super.superC(1);
168 }
169 static fac() {
170 return const$8 || (const$8 = dart.const(new library_prefixes_test1.D.named ()));
171 }
172 };
173 dart.defineNamedConstructor(library_prefixes_test1.D, 'named');
174 dart.setSignature(library_prefixes_test1.D, {
175 constructors: () => ({
176 new: dart.definiteFunctionType(library_prefixes_test1.D, []),
177 named: dart.definiteFunctionType(library_prefixes_test1.D, []),
178 fac: dart.definiteFunctionType(library_prefixes_test1.D, [])
179 })
180 });
181 library_prefixes_test1.E = class E extends core.Object {
182 new() {
183 this.f = null;
184 }
185 fun(x) {
186 this.f = dart.fn(() => dart.dsend(x, '+', 11), VoidTodynamic());
187 }
188 static foo() {
189 return 0;
190 }
191 static fooo(x) {
192 return dart.fn(() => dart.dsend(x, '+', 99), VoidTodynamic());
193 }
194 bar() {
195 return 1;
196 }
197 toto(x) {
198 return dart.fn(() => dart.dsend(x, '+', 2), VoidTodynamic());
199 }
200 };
201 dart.defineNamedConstructor(library_prefixes_test1.E, 'fun');
202 dart.setSignature(library_prefixes_test1.E, {
203 constructors: () => ({
204 new: dart.definiteFunctionType(library_prefixes_test1.E, []),
205 fun: dart.definiteFunctionType(library_prefixes_test1.E, [dart.dynamic])
206 }),
207 methods: () => ({
208 bar: dart.definiteFunctionType(dart.dynamic, []),
209 toto: dart.definiteFunctionType(dart.dynamic, [dart.dynamic])
210 }),
211 statics: () => ({
212 foo: dart.definiteFunctionType(dart.dynamic, []),
213 fooo: dart.definiteFunctionType(dart.dynamic, [dart.dynamic])
214 }),
215 names: ['foo', 'fooo']
216 });
217 library_prefixes_test2.Constants = class Constants extends core.Object {};
218 library_prefixes_test2.Constants.PI = 3.14;
219 library_prefixes_test2.Constants.foo = 2;
220 library_prefixes_test2.A = class A extends core.Object {
221 new() {
222 this.x = 2;
223 }
224 named() {
225 this.x = 4;
226 }
227 superC(x) {
228 this.x = core.int._check(dart.dsend(x, '+', 11));
229 }
230 static fac() {
231 return new library_prefixes_test2.A.named();
232 }
233 };
234 dart.defineNamedConstructor(library_prefixes_test2.A, 'named');
235 dart.defineNamedConstructor(library_prefixes_test2.A, 'superC');
236 dart.setSignature(library_prefixes_test2.A, {
237 constructors: () => ({
238 new: dart.definiteFunctionType(library_prefixes_test2.A, []),
239 named: dart.definiteFunctionType(library_prefixes_test2.A, []),
240 superC: dart.definiteFunctionType(library_prefixes_test2.A, [dart.dynamic] ),
241 fac: dart.definiteFunctionType(library_prefixes_test2.A, [])
242 })
243 });
244 library_prefixes_test2.A.y = 0;
245 library_prefixes_test2.B = class B extends library_prefixes_test2.A {
246 new() {
247 super.new();
248 }
249 named() {
250 super.superC(2);
251 }
252 static fac() {
253 return new library_prefixes_test2.B.named();
254 }
255 };
256 dart.defineNamedConstructor(library_prefixes_test2.B, 'named');
257 dart.setSignature(library_prefixes_test2.B, {
258 constructors: () => ({
259 new: dart.definiteFunctionType(library_prefixes_test2.B, []),
260 named: dart.definiteFunctionType(library_prefixes_test2.B, []),
261 fac: dart.definiteFunctionType(library_prefixes_test2.B, [])
262 })
263 });
264 let const$9;
265 library_prefixes_test2.C = class C extends core.Object {
266 new() {
267 this.x = 2;
268 }
269 named() {
270 this.x = 4;
271 }
272 superC(x) {
273 this.x = core.int._check(dart.dsend(x, '+', 11));
274 }
275 static fac() {
276 return const$9 || (const$9 = dart.const(new library_prefixes_test2.C.named ()));
277 }
278 };
279 dart.defineNamedConstructor(library_prefixes_test2.C, 'named');
280 dart.defineNamedConstructor(library_prefixes_test2.C, 'superC');
281 dart.setSignature(library_prefixes_test2.C, {
282 constructors: () => ({
283 new: dart.definiteFunctionType(library_prefixes_test2.C, []),
284 named: dart.definiteFunctionType(library_prefixes_test2.C, []),
285 superC: dart.definiteFunctionType(library_prefixes_test2.C, [dart.dynamic] ),
286 fac: dart.definiteFunctionType(library_prefixes_test2.C, [])
287 })
288 });
289 let const$10;
290 library_prefixes_test2.D = class D extends library_prefixes_test2.C {
291 new() {
292 super.new();
293 }
294 named() {
295 super.superC(2);
296 }
297 static fac() {
298 return const$10 || (const$10 = dart.const(new library_prefixes_test2.D.nam ed()));
299 }
300 };
301 dart.defineNamedConstructor(library_prefixes_test2.D, 'named');
302 dart.setSignature(library_prefixes_test2.D, {
303 constructors: () => ({
304 new: dart.definiteFunctionType(library_prefixes_test2.D, []),
305 named: dart.definiteFunctionType(library_prefixes_test2.D, []),
306 fac: dart.definiteFunctionType(library_prefixes_test2.D, [])
307 })
308 });
309 library_prefixes_test2.E = class E extends core.Object {
310 new() {
311 this.f = null;
312 }
313 fun(x) {
314 this.f = dart.fn(() => dart.dsend(x, '+', 13), VoidTodynamic());
315 }
316 static foo() {
317 return 3;
318 }
319 static fooo(x) {
320 return dart.fn(() => dart.dsend(x, '+', 1024), VoidTodynamic());
321 }
322 bar() {
323 return 4;
324 }
325 toto(x) {
326 return dart.fn(() => dart.dsend(x, '+', 5), VoidTodynamic());
327 }
328 };
329 dart.defineNamedConstructor(library_prefixes_test2.E, 'fun');
330 dart.setSignature(library_prefixes_test2.E, {
331 constructors: () => ({
332 new: dart.definiteFunctionType(library_prefixes_test2.E, []),
333 fun: dart.definiteFunctionType(library_prefixes_test2.E, [dart.dynamic])
334 }),
335 methods: () => ({
336 bar: dart.definiteFunctionType(dart.dynamic, []),
337 toto: dart.definiteFunctionType(dart.dynamic, [dart.dynamic])
338 }),
339 statics: () => ({
340 foo: dart.definiteFunctionType(dart.dynamic, []),
341 fooo: dart.definiteFunctionType(dart.dynamic, [dart.dynamic])
342 }),
343 names: ['foo', 'fooo']
344 });
345 // Exports:
346 exports.library_prefixes_test = library_prefixes_test;
347 exports.library_prefixes = library_prefixes;
348 exports.library_prefixes_test1 = library_prefixes_test1;
349 exports.library_prefixes_test2 = library_prefixes_test2;
350 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698