Index: tests/compiler/dart2js/mock_compiler.dart |
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart |
index 18102295ea8d7de3ada6d0ad68de76ae61eedd7b..b587f5665925171fd94354473d30feff4b67b65e 100644 |
--- a/tests/compiler/dart2js/mock_compiler.dart |
+++ b/tests/compiler/dart2js/mock_compiler.dart |
@@ -145,6 +145,14 @@ class MockCompiler extends Compiler { |
} |
/** |
+ * Registers the [source] with [uri] making it possible load [source] as a |
+ * library. |
+ */ |
+ void registerSource(Uri uri, String source) { |
+ sourceFiles[uri.toString()] = new MockFile(source); |
+ } |
+ |
+ /** |
* Used internally to create a library from a source text. The created library |
* is fixed to export its top-level declarations. |
*/ |