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

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

Issue 17759007: First pass at asynchronous input loading in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 7 years, 3 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/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 {
« no previous file with comments | « tests/compiler/dart2js/mirror_helper_unique_minification_test.dart ('k') | tests/compiler/dart2js/mirrors_lookup_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698