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

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

Issue 2875313002: Access BackendUsage through ClosedWorld (Closed)
Patch Set: Created 3 years, 7 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 // 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_compiler.dart'; 7 import 'memory_compiler.dart';
8 8
9 import 'package:compiler/src/compiler.dart' as dart2js; 9 import 'package:compiler/src/compiler.dart' as dart2js;
10 10
11 void main() { 11 void main() {
12 asyncTest(() async { 12 asyncTest(() async {
13 CompilationResult result = 13 CompilationResult result =
14 await runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES); 14 await runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES);
15 dart2js.Compiler compiler = result.compiler; 15 dart2js.Compiler compiler = result.compiler;
16 16
17 lookupLibrary(name) { 17 lookupLibrary(name) {
18 return compiler.libraryLoader.lookupLibrary(Uri.parse(name)); 18 return compiler.libraryLoader.lookupLibrary(Uri.parse(name));
19 } 19 }
20 20
21 var main = compiler.mainFunction; 21 var main = compiler.mainFunction;
22 Expect.isNotNull(main, "Could not find 'main'"); 22 Expect.isNotNull(main, "Could not find 'main'");
23 compiler.deferredLoadTask.onResolutionComplete(main); 23 compiler.deferredLoadTask.onResolutionComplete(
24 main, compiler.resolutionWorldBuilder.closedWorldForTesting);
24 25
25 var outputUnitForElement = compiler.deferredLoadTask.outputUnitForElement; 26 var outputUnitForElement = compiler.deferredLoadTask.outputUnitForElement;
26 27
27 var lib = lookupLibrary("memory:lib.dart"); 28 var lib = lookupLibrary("memory:lib.dart");
28 var a = lib.find("a"); 29 var a = lib.find("a");
29 var b = lib.find("b"); 30 var b = lib.find("b");
30 var c = lib.find("c"); 31 var c = lib.find("c");
31 var d = lib.find("d"); 32 var d = lib.find("d");
32 Expect.equals(outputUnitForElement(a), outputUnitForElement(b)); 33 Expect.equals(outputUnitForElement(a), outputUnitForElement(b));
33 Expect.equals(outputUnitForElement(a), outputUnitForElement(c)); 34 Expect.equals(outputUnitForElement(a), outputUnitForElement(c));
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 class D2 { 106 class D2 {
106 D2(x) { 107 D2(x) {
107 d(); 108 d();
108 } 109 }
109 } 110 }
110 111
111 // Implicit redirecting "super" call with a parameter via mixin. 112 // Implicit redirecting "super" call with a parameter via mixin.
112 class D3 = D2 with D1; 113 class D3 = D2 with D1;
113 """, 114 """,
114 }; 115 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698