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

Unified Diff: tests/compiler/dart2js/related_types_test.dart

Issue 2936233003: Remove Compiler.mainApp and Compiler.mainFunction (Closed)
Patch Set: Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/related_types_test.dart
diff --git a/tests/compiler/dart2js/related_types_test.dart b/tests/compiler/dart2js/related_types_test.dart
index 89ee01a9820a2d15fbb0a88cf5962256060394b6..a2ca1508fe92bd6d2b7d9c8f8a97317bf303c3e3 100644
--- a/tests/compiler/dart2js/related_types_test.dart
+++ b/tests/compiler/dart2js/related_types_test.dart
@@ -7,6 +7,7 @@ library related_types.test;
import 'package:async_helper/async_helper.dart';
import 'package:expect/expect.dart';
import 'package:compiler/src/commandline_options.dart';
+import 'package:compiler/src/common_elements.dart';
import 'package:compiler/src/compiler.dart';
import 'package:compiler/src/diagnostics/messages.dart';
import 'package:compiler/src/elements/elements.dart';
@@ -267,7 +268,9 @@ main(List<String> arguments) {
Expect.isFalse(
collector.hasRegularMessages, "Unexpected analysis messages.");
Compiler compiler = result.compiler;
- compiler.closeResolution();
+ ElementEnvironment elementEnvironment =
+ compiler.frontendStrategy.elementEnvironment;
+ compiler.closeResolution(elementEnvironment.mainFunction);
void checkMember(MemberElement member) {
if (!member.name.startsWith('test_')) return;
@@ -283,7 +286,7 @@ main(List<String> arguments) {
"for $member.");
}
- LibraryElement mainApp = compiler.mainApp;
+ LibraryElement mainApp = elementEnvironment.mainLibrary;
mainApp.forEachLocalMember((Element element) {
if (element.isClass) {
ClassElement cls = element;
« no previous file with comments | « tests/compiler/dart2js/related_types.dart ('k') | tests/compiler/dart2js/serialization/model_test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698