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

Unified Diff: tests/compiler/dart2js/instantiated_classes_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/instantiated_classes_test.dart
diff --git a/tests/compiler/dart2js/instantiated_classes_test.dart b/tests/compiler/dart2js/instantiated_classes_test.dart
index b270135bad8ddf95f8f3e89390038e7eaf350c11..a55da9060d39e1a09c0f6a400900d8161c5ccae5 100644
--- a/tests/compiler/dart2js/instantiated_classes_test.dart
+++ b/tests/compiler/dart2js/instantiated_classes_test.dart
@@ -7,7 +7,8 @@ library instantiated_classes_test;
import 'dart:async';
import 'package:expect/expect.dart';
import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/elements/entities.dart' show ClassEntity;
+import 'package:compiler/src/elements/entities.dart'
+ show ClassEntity, LibraryEntity;
import 'type_test_helper.dart';
void main() {
@@ -90,11 +91,13 @@ Future test(String source, List<String> directlyInstantiatedClasses,
return TypeEnvironment
.create(source, mainSource: mainSource.toString(), useMockCompiler: true)
.then((env) {
+ LibraryEntity mainLibrary =
+ env.compiler.frontendStrategy.elementEnvironment.mainLibrary;
Iterable<ClassEntity> expectedClasses =
directlyInstantiatedClasses.map(env.getElement);
Iterable<ClassEntity> actualClasses = env
.compiler.resolutionWorldBuilder.directlyInstantiatedClasses
- .where((c) => c.library == env.compiler.mainApp);
+ .where((c) => c.library == mainLibrary);
Expect.setEquals(expectedClasses, actualClasses);
});
}
« no previous file with comments | « tests/compiler/dart2js/inference/inference_test_helper.dart ('k') | tests/compiler/dart2js/kernel/constructors_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698