Index: tests/compiler/dart2js/mock_compiler.dart |
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart |
index 95909bec63dc737af78f8d9c53de0b8328630ae7..75eef6c6ddab657d3dbe2d7e5b7a30792fc7cf36 100644 |
--- a/tests/compiler/dart2js/mock_compiler.dart |
+++ b/tests/compiler/dart2js/mock_compiler.dart |
@@ -117,8 +117,14 @@ class MockCompiler extends Compiler { |
buildLibrarySource(DEFAULT_ISOLATE_HELPER_LIBRARY)); |
registerSource(Compiler.DART_MIRRORS, |
buildLibrarySource(DEFAULT_MIRRORS_LIBRARY)); |
+ |
+ Map<String, String> asyncLibrarySource = <String, String>{}; |
+ asyncLibrarySource.addAll(DEFAULT_ASYNC_LIBRARY); |
+ if (enableAsyncAwait) { |
+ asyncLibrarySource.addAll(ASYNC_AWAIT_LIBRARY); |
+ } |
registerSource(Compiler.DART_ASYNC, |
- buildLibrarySource(DEFAULT_ASYNC_LIBRARY)); |
+ buildLibrarySource(asyncLibrarySource)); |
} |
String get patchVersion { |