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

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

Issue 841653004: Recover from read errors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r42871 Created 5 years, 11 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: dart/tests/compiler/dart2js/missing_file_test.dart
diff --git a/dart/tests/compiler/dart2js/missing_file_test.dart b/dart/tests/compiler/dart2js/missing_file_test.dart
index 92c94d54f395e142461e2b065d600d779db74364..630063b8efe28d122dd2180d2ab825df1f01b500 100644
--- a/dart/tests/compiler/dart2js/missing_file_test.dart
+++ b/dart/tests/compiler/dart2js/missing_file_test.dart
@@ -27,7 +27,8 @@ main() {}
''',
};
-void runCompiler(Uri main, String expectedMessage) {
+Future runCompiler(Uri main, String expectedMessage) {
+ print("\n\n\n");
Uri script = currentDirectory.resolveUri(Platform.script);
Uri libraryRoot = script.resolve('../../../sdk/');
Uri packageRoot = script.resolve('./packages/');
@@ -58,20 +59,24 @@ void runCompiler(Uri main, String expectedMessage) {
[],
{});
- asyncTest(() => compiler.run(main).then((_) {
+ return compiler.run(main).then((_) {
Expect.equals(1, errors.length);
Expect.equals(expectedMessage,
errors[0]);
- }));
+ });
}
void main() {
- runCompiler(Uri.parse('memory:main.dart'),
- "Can't read 'memory:foo.dart' "
- "(Exception: No such file memory:foo.dart).");
- runCompiler(Uri.parse('memory:foo.dart'),
- "Can't read 'memory:foo.dart' "
- "(Exception: No such file memory:foo.dart).");
- runCompiler(Uri.parse('dart:foo'),
- "Library not found 'dart:foo'.");
+ asyncTest(() => Future.forEach([
+ () => runCompiler(
+ Uri.parse('memory:main.dart'),
+ "Can't read 'memory:foo.dart' "
+ "(Exception: No such file memory:foo.dart)."),
+ () => runCompiler(
+ Uri.parse('memory:foo.dart'),
+ "Exception: No such file memory:foo.dart"),
+ () => runCompiler(
+ Uri.parse('dart:foo'),
+ "Library not found 'dart:foo'."),
+ ], (f) => f()));
}
« no previous file with comments | « dart/tests/compiler/dart2js/message_kind_helper.dart ('k') | dart/tests/compiler/dart2js/package_root_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698