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

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

Issue 326913002: Make dart2js unittests async. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 6 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/reexport_handled_test.dart
diff --git a/tests/compiler/dart2js/reexport_handled_test.dart b/tests/compiler/dart2js/reexport_handled_test.dart
index f2982ed1a7e1eae5fad1b651543541ebe9cd080d..8e5a61df12ac43d2ab4bf21b4a86190e29505ebd 100644
--- a/tests/compiler/dart2js/reexport_handled_test.dart
+++ b/tests/compiler/dart2js/reexport_handled_test.dart
@@ -24,13 +24,14 @@ export 'exporting.dart';
''';
void main() {
- var compiler = new MockCompiler();
- compiler.registerSource(exportingLibraryUri, EXPORTING_LIBRARY_SOURCE);
- compiler.registerSource(reexportingLibraryUri, REEXPORTING_LIBRARY_SOURCE);
-
- // Load exporting library before the reexporting library.
- asyncTest(() => compiler.libraryLoader.loadLibrary(
- exportingLibraryUri, null, exportingLibraryUri).then((exportingLibrary) {
+ var compiler;
+ asyncTest(() => MockCompiler.create((MockCompiler c) {
+ compiler = c;
+ compiler.registerSource(exportingLibraryUri, EXPORTING_LIBRARY_SOURCE);
+ compiler.registerSource(reexportingLibraryUri, REEXPORTING_LIBRARY_SOURCE);
+ return compiler.libraryLoader.loadLibrary(
+ exportingLibraryUri, null, exportingLibraryUri);
+ }).then((exportingLibrary) {
Expect.isTrue(exportingLibrary.exportsHandled);
var foo = findInExports(exportingLibrary, 'foo');
Expect.isNotNull(foo);
« no previous file with comments | « tests/compiler/dart2js/redundant_phi_eliminator_test.dart ('k') | tests/compiler/dart2js/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698