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

Side by Side Diff: tests/compiler/dart2js/deferred_follow_implicit_super_regression_test.dart

Issue 330913004: Move Compiler.libraries to LibraryLoader. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix compiler_isolate.dart Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:expect/expect.dart'; 5 import 'package:expect/expect.dart';
6 import "package:async_helper/async_helper.dart"; 6 import "package:async_helper/async_helper.dart";
7 import 'memory_source_file_helper.dart'; 7 import 'memory_source_file_helper.dart';
8 import "memory_compiler.dart"; 8 import "memory_compiler.dart";
9 import "dart:async"; 9 import "dart:async";
10 10
11 import 'package:compiler/implementation/dart2jslib.dart' 11 import 'package:compiler/implementation/dart2jslib.dart'
12 as dart2js; 12 as dart2js;
13 13
14 runTest(String mainScript, test) { 14 runTest(String mainScript, test) {
15 Compiler compiler = compilerFor(MEMORY_SOURCE_FILES, 15 Compiler compiler = compilerFor(MEMORY_SOURCE_FILES,
16 outputProvider: new OutputCollector()); 16 outputProvider: new OutputCollector());
17 asyncTest(() => compiler.run(Uri.parse(mainScript)) 17 asyncTest(() => compiler.run(Uri.parse(mainScript))
18 .then((_) => test(compiler))); 18 .then((_) => test(compiler)));
19 } 19 }
20 20
21 void main() { 21 void main() {
22 runTest('memory:main.dart', (compiler) { 22 runTest('memory:main.dart', (compiler) {
23 lookupLibrary(name) {
24 return compiler.libraryLoader.lookupLibrary(Uri.parse(name));
25 }
26
23 var main = compiler.mainApp.find(dart2js.Compiler.MAIN); 27 var main = compiler.mainApp.find(dart2js.Compiler.MAIN);
24 Expect.isNotNull(main, "Could not find 'main'"); 28 Expect.isNotNull(main, "Could not find 'main'");
25 compiler.deferredLoadTask.onResolutionComplete(main); 29 compiler.deferredLoadTask.onResolutionComplete(main);
26 30
27 var outputUnitForElement = compiler.deferredLoadTask.outputUnitForElement; 31 var outputUnitForElement = compiler.deferredLoadTask.outputUnitForElement;
28 32
29 var lib = compiler.libraries["memory:lib.dart"]; 33 var lib = lookupLibrary("memory:lib.dart");
30 var a = lib.find("a"); 34 var a = lib.find("a");
31 var b = lib.find("b"); 35 var b = lib.find("b");
32 var c = lib.find("c"); 36 var c = lib.find("c");
33 var d = lib.find("d"); 37 var d = lib.find("d");
34 Expect.equals(outputUnitForElement(a), outputUnitForElement(b)); 38 Expect.equals(outputUnitForElement(a), outputUnitForElement(b));
35 Expect.equals(outputUnitForElement(a), outputUnitForElement(c)); 39 Expect.equals(outputUnitForElement(a), outputUnitForElement(c));
36 Expect.equals(outputUnitForElement(a), outputUnitForElement(d)); 40 Expect.equals(outputUnitForElement(a), outputUnitForElement(d));
37 }); 41 });
38 } 42 }
39 43
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 class D2 { 111 class D2 {
108 D2(x) { 112 D2(x) {
109 d(); 113 d();
110 } 114 }
111 } 115 }
112 116
113 // Implicit redirecting "super" call with a parameter via mixin. 117 // Implicit redirecting "super" call with a parameter via mixin.
114 class D3 = D2 with D1; 118 class D3 = D2 with D1;
115 """, 119 """,
116 }; 120 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698