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

Unified Diff: tests/compiler/dart2js/part_of_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
« no previous file with comments | « tests/compiler/dart2js/package_root_test.dart ('k') | tests/compiler/dart2js/patch_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/part_of_test.dart
diff --git a/tests/compiler/dart2js/part_of_test.dart b/tests/compiler/dart2js/part_of_test.dart
index 629c267013c8cc275ca0dc3e36333f8c49772dc7..79eebf20270230ac7eda964cb132798d9ee310f2 100644
--- a/tests/compiler/dart2js/part_of_test.dart
+++ b/tests/compiler/dart2js/part_of_test.dart
@@ -5,6 +5,7 @@
library part_of_test;
import "package:expect/expect.dart";
+import "package:async_helper/async_helper.dart";
import 'mock_compiler.dart';
import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart'
show MessageKind;
@@ -25,13 +26,16 @@ void main() {
compiler.registerSource(libraryUri, LIBRARY_SOURCE);
compiler.registerSource(partUri, PART_SOURCE);
- compiler.libraryLoader.loadLibrary(libraryUri, null, libraryUri);
- print('errors: ${compiler.errors}');
- print('warnings: ${compiler.warnings}');
- Expect.isTrue(compiler.errors.isEmpty);
- Expect.equals(1, compiler.warnings.length);
- Expect.equals(MessageKind.LIBRARY_NAME_MISMATCH,
- compiler.warnings[0].message.kind);
- Expect.equals('foo',
- compiler.warnings[0].message.arguments['libraryName'].toString());
+ asyncTest(() =>
+ compiler.libraryLoader.loadLibrary(libraryUri, null, libraryUri).
+ then((_) {
+ print('errors: ${compiler.errors}');
+ print('warnings: ${compiler.warnings}');
+ Expect.isTrue(compiler.errors.isEmpty);
+ Expect.equals(1, compiler.warnings.length);
+ Expect.equals(MessageKind.LIBRARY_NAME_MISMATCH,
+ compiler.warnings[0].message.kind);
+ Expect.equals('foo',
+ compiler.warnings[0].message.arguments['libraryName'].toString());
+ }));
}
« no previous file with comments | « tests/compiler/dart2js/package_root_test.dart ('k') | tests/compiler/dart2js/patch_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698