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

Unified Diff: tests/compiler/dart2js/bad_loop_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/bad_loop_test.dart
diff --git a/tests/compiler/dart2js/bad_loop_test.dart b/tests/compiler/dart2js/bad_loop_test.dart
index 5cecb22cf81b054c83068a86a3e762b083029ea0..65629a453e8fb1bac366d2f252aec162f166f61e 100644
--- a/tests/compiler/dart2js/bad_loop_test.dart
+++ b/tests/compiler/dart2js/bad_loop_test.dart
@@ -4,6 +4,7 @@
import 'package:expect/expect.dart';
import 'memory_source_file_helper.dart';
+import "package:async_helper/async_helper.dart";
import '../../../sdk/lib/_internal/compiler/compiler.dart'
show Diagnostic;
@@ -13,8 +14,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);
int warningCount = 0;
int errorCount = 0;
void diagnosticHandler(Uri uri, int begin, int end,
@@ -37,10 +37,12 @@ main() {
libraryRoot,
packageRoot,
['--analyze-only']);
- compiler.run(Uri.parse('memory:main.dart'));
- Expect.isTrue(compiler.compilationFailed);
- Expect.equals(5, errorCount);
- Expect.equals(1, warningCount);
+ asyncStart();
+ compiler.run(Uri.parse('memory:main.dart')).then((_) {
+ Expect.isTrue(compiler.compilationFailed);
+ Expect.equals(5, errorCount);
+ Expect.equals(1, warningCount);
+ }).whenComplete(() => asyncEnd());
}
const Map MEMORY_SOURCE_FILES = const {

Powered by Google App Engine
This is Rietveld 408576698