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

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

Issue 2781423003: Start preparing tests to accept binary compiler input. (Closed)
Patch Set: .. Created 3 years, 9 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/memory_compiler.dart
diff --git a/tests/compiler/dart2js/memory_compiler.dart b/tests/compiler/dart2js/memory_compiler.dart
index 98bb64576bb704e413f5c805a016ae829d148755..d3b183be08cda5c1f9a789a3732c74152387a927 100644
--- a/tests/compiler/dart2js/memory_compiler.dart
+++ b/tests/compiler/dart2js/memory_compiler.dart
@@ -15,7 +15,7 @@ import 'package:compiler/compiler_new.dart'
Diagnostic,
PackagesDiscoveryProvider;
import 'package:compiler/src/diagnostics/messages.dart' show Message;
-import 'package:compiler/src/elements/elements.dart' show LibraryElement;
+import 'package:compiler/src/elements/entities.dart' show LibraryEntity;
import 'package:compiler/src/enqueue.dart' show ResolutionEnqueuer;
import 'package:compiler/src/null_compiler_output.dart' show NullCompilerOutput;
import 'package:compiler/src/library_loader.dart' show LoadedLibraries;
@@ -62,8 +62,11 @@ CompilerDiagnostics createCompilerDiagnostics(
Expando<MemorySourceFileProvider> expando =
new Expando<MemorySourceFileProvider>();
+/// memorySourceFiles can contain a map of string filename to string file
+/// contents or string file name to binary file contents (hence the `dynamic`
+/// type for the second parameter).
Future<CompilationResult> runCompiler(
- {Map<String, String> memorySourceFiles: const <String, String>{},
+ {Map<String, dynamic> memorySourceFiles: const <String, dynamic>{},
Uri entryPoint,
List<Uri> entryPoints,
List<Uri> resolutionInputs,
@@ -102,7 +105,7 @@ Future<CompilationResult> runCompiler(
CompilerImpl compilerFor(
{Uri entryPoint,
List<Uri> resolutionInputs,
- Map<String, String> memorySourceFiles: const <String, String>{},
+ Map<String, dynamic> memorySourceFiles: const <String, dynamic>{},
CompilerDiagnostics diagnosticHandler,
CompilerOutput outputProvider,
List<String> options: const <String>[],
@@ -226,7 +229,7 @@ class MemoryLoadedLibraries implements LoadedLibraries {
getLibrary(Uri uri) => copiedLibraries[uri];
@override
- LibraryElement get rootLibrary => copiedLibraries.values.first;
+ LibraryEntity get rootLibrary => copiedLibraries.values.first;
}
DiagnosticHandler createDiagnosticHandler(DiagnosticHandler diagnosticHandler,
« no previous file with comments | « tests/compiler/dart2js/library_resolution_test.dart ('k') | tests/compiler/dart2js/memory_source_file_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698