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

Unified Diff: tests/compiler/dart2js/kernel/compiler_helper.dart

Issue 2912083002: Add compile_from_dill test (Closed)
Patch Set: Created 3 years, 7 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/kernel/compiler_helper.dart
diff --git a/tests/compiler/dart2js/kernel/compiler_helper.dart b/tests/compiler/dart2js/kernel/compiler_helper.dart
index 2c0b644a6a69579d8d8036565b659a67ff2221c3..51619e0bd90059c6c301d517820817d5d22b4254 100644
--- a/tests/compiler/dart2js/kernel/compiler_helper.dart
+++ b/tests/compiler/dart2js/kernel/compiler_helper.dart
@@ -9,6 +9,7 @@ library dart2js.kernel.compiler_helper;
import 'dart:async';
import 'dart:io';
+import 'package:compiler/compiler_new.dart';
import 'package:compiler/src/commandline_options.dart';
import 'package:compiler/src/common.dart';
import 'package:compiler/src/common/names.dart';
@@ -139,8 +140,8 @@ class MemoryDillLibraryLoaderTask extends DillLibraryLoaderTask {
}
Future<Compiler> compileWithDill(
- Uri entryPoint, Map<String, String> memorySourceFiles,
- {bool printSteps: false}) async {
+ Uri entryPoint, Map<String, String> memorySourceFiles, List<String> options,
+ {bool printSteps: false, CompilerOutput compilerOutput}) async {
if (memorySourceFiles.isNotEmpty) {
Directory dir = await Directory.systemTemp.createTemp('dart2js-with-dill');
if (printSteps) {
@@ -164,11 +165,10 @@ Future<Compiler> compileWithDill(
if (printSteps) {
print('---- closed world from dill $dillFile ----------------------------');
}
- Compiler compiler = compilerFor(entryPoint: dillFile, options: [
- Flags.analyzeOnly,
- Flags.enableAssertMessage,
- Flags.loadFromDill
- ]);
+ Compiler compiler = compilerFor(
+ entryPoint: dillFile,
+ options: [Flags.loadFromDill]..addAll(options),
+ outputProvider: compilerOutput);
ElementResolutionWorldBuilder.useInstantiationMap = true;
compiler.resolution.retainCachesForTesting = true;
await compiler.run(dillFile);

Powered by Google App Engine
This is Rietveld 408576698