Index: tests/compiler/dart2js/mirror_tree_shaking_test.dart |
diff --git a/tests/compiler/dart2js/mirror_tree_shaking_test.dart b/tests/compiler/dart2js/mirror_tree_shaking_test.dart |
index c3c639374ef3a83256afcb8cc4db034ce996f0c2..67717f64d024a825af65b08a526e8e7c7a384bff 100644 |
--- a/tests/compiler/dart2js/mirror_tree_shaking_test.dart |
+++ b/tests/compiler/dart2js/mirror_tree_shaking_test.dart |
@@ -5,6 +5,7 @@ |
// Test that tree-shaking hasn't been turned off. |
import 'package:expect/expect.dart'; |
+import "package:async_helper/async_helper.dart"; |
import 'memory_source_file_helper.dart'; |
import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' |
@@ -20,8 +21,7 @@ main() { |
Uri libraryRoot = script.resolve('../../../sdk/'); |
Uri packageRoot = script.resolve('./packages/'); |
- MemorySourceFileProvider.MEMORY_SOURCE_FILES = MEMORY_SOURCE_FILES; |
- var provider = new MemorySourceFileProvider(); |
+ var provider = new MemorySourceFileProvider(MEMORY_SOURCE_FILES); |
void diagnosticHandler(Uri uri, int begin, int end, |
String message, Diagnostic kind) { |
if (kind == Diagnostic.VERBOSE_INFO |
@@ -42,12 +42,13 @@ main() { |
libraryRoot, |
packageRoot, |
[]); |
- compiler.run(Uri.parse('memory:main.dart')); |
- Expect.isFalse(compiler.compilationFailed); |
- Expect.isFalse(compiler.enqueuer.resolution.hasEnqueuedEverything); |
- Expect.isFalse(compiler.enqueuer.codegen.hasEnqueuedEverything); |
- Expect.isFalse(compiler.disableTypeInference); |
- Expect.isFalse(compiler.backend.hasRetainedMetadata); |
+ asyncTest(() => compiler.run(Uri.parse('memory:main.dart')).then((_) { |
+ Expect.isFalse(compiler.compilationFailed); |
+ Expect.isFalse(compiler.enqueuer.resolution.hasEnqueuedEverything); |
+ Expect.isFalse(compiler.enqueuer.codegen.hasEnqueuedEverything); |
+ Expect.isFalse(compiler.disableTypeInference); |
+ Expect.isFalse(compiler.backend.hasRetainedMetadata); |
+ })); |
} |
const Map MEMORY_SOURCE_FILES = const { |