| Index: tests/compiler/dart2js/check_elements_invariants_test.dart
|
| diff --git a/tests/compiler/dart2js/check_elements_invariants_test.dart b/tests/compiler/dart2js/check_elements_invariants_test.dart
|
| index 2aff25489331fbde35a3bca1bcf2d589125b6f53..471cee4f94abc14011d7f597361386f991b9343b 100644
|
| --- a/tests/compiler/dart2js/check_elements_invariants_test.dart
|
| +++ b/tests/compiler/dart2js/check_elements_invariants_test.dart
|
| @@ -4,15 +4,13 @@
|
|
|
| import 'dart:async';
|
| import 'package:compiler/src/apiimpl.dart';
|
| -import 'package:compiler/src/dart2jslib.dart' show NullSink;
|
| import 'package:expect/expect.dart';
|
| -import 'package:compiler/src/filenames.dart';
|
| -import 'package:compiler/src/source_file_provider.dart';
|
| import 'package:compiler/src/elements/elements.dart'
|
| show ClassElement;
|
| import 'package:compiler/src/resolution/class_members.dart'
|
| show ClassMemberMixin;
|
| import "package:async_helper/async_helper.dart";
|
| +import 'memory_compiler.dart';
|
|
|
|
|
| const String DART2JS_SOURCE =
|
| @@ -24,8 +22,8 @@ const List<String> DART2JS_OPTIONS = const <String>[
|
|
|
| Iterable<ClassElement> computeLiveClasses(Compiler compiler) {
|
| return new Set<ClassElement>()
|
| - ..addAll(compiler.resolverWorld.instantiatedClasses)
|
| - ..addAll(compiler.codegenWorld.instantiatedClasses);
|
| + ..addAll(compiler.resolverWorld.directlyInstantiatedClasses)
|
| + ..addAll(compiler.codegenWorld.directlyInstantiatedClasses);
|
| }
|
|
|
| void checkClassInvariants(ClassElement cls) {
|
| @@ -35,16 +33,7 @@ void checkClassInvariants(ClassElement cls) {
|
| }
|
|
|
| Future checkElementInvariantsAfterCompiling(Uri uri) {
|
| - var inputProvider = new CompilerSourceFileProvider();
|
| - var handler = new FormattingDiagnosticHandler(inputProvider);
|
| - var compiler = new Compiler(inputProvider.readStringFromUri,
|
| - NullSink.outputProvider,
|
| - handler,
|
| - currentDirectory.resolve('sdk/'),
|
| - currentDirectory.resolve('sdk/'),
|
| - DART2JS_OPTIONS,
|
| - {});
|
| -
|
| + var compiler = compilerFor({}, options: DART2JS_OPTIONS);
|
| return compiler.run(uri).then((passed) {
|
| Expect.isTrue(passed, "Compilation of dart2js failed.");
|
|
|
| @@ -53,6 +42,6 @@ Future checkElementInvariantsAfterCompiling(Uri uri) {
|
| }
|
|
|
| void main () {
|
| - var uri = currentDirectory.resolve(DART2JS_SOURCE);
|
| + var uri = Uri.base.resolve(DART2JS_SOURCE);
|
| asyncTest(() => checkElementInvariantsAfterCompiling(uri));
|
| }
|
|
|