| Index: tests/compiler/dart2js/serialization/analysis_test.dart
|
| diff --git a/tests/compiler/dart2js/serialization/analysis_test.dart b/tests/compiler/dart2js/serialization/analysis_test.dart
|
| index 42c1f5fc6c40de64c3e74ae7faf3182951413f4e..152972bd7cc726e2ce63ee9af167e77fff6ee8e1 100644
|
| --- a/tests/compiler/dart2js/serialization/analysis_test.dart
|
| +++ b/tests/compiler/dart2js/serialization/analysis_test.dart
|
| @@ -21,29 +21,32 @@ main(List<String> args) {
|
| await serializeDartCore(arguments: arguments);
|
| if (arguments.filename != null) {
|
| Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename));
|
| - await analyze(serializedData, entryPoint, null);
|
| + await analyze(entryPoint,
|
| + resolutionInputs: serializedData.toUris(),
|
| + sourceFiles: serializedData.toMemorySourceFiles());
|
| } else {
|
| - Uri entryPoint = Uri.parse('memory:main.dart');
|
| - await arguments.forEachTest(TESTS, (int index, Test test) async {
|
| - await analyze(serializedData, entryPoint, test);
|
| - });
|
| + await arguments.forEachTest(serializedData, TESTS, analyze);
|
| }
|
| });
|
| }
|
|
|
| -Future analyze(SerializedData serializedData, Uri entryPoint, Test test,
|
| - {int index}) async {
|
| - String testDescription =
|
| - test != null ? test.sourceFiles[entryPoint.path] : '${entryPoint}';
|
| +Future analyze(
|
| + Uri entryPoint,
|
| + {Map<String, String> sourceFiles: const <String, String>{},
|
| + List<Uri> resolutionInputs,
|
| + int index,
|
| + Test test,
|
| + bool verbose: false}) async {
|
| + String testDescription = test != null ? test.name : '${entryPoint}';
|
| + String id = index != null ? '$index: ' : '';
|
| print('------------------------------------------------------------------');
|
| - print('analyze ${index != null ? '$index:' :''}${testDescription}');
|
| + print('analyze ${id}${testDescription}');
|
| print('------------------------------------------------------------------');
|
| DiagnosticCollector diagnosticCollector = new DiagnosticCollector();
|
| await runCompiler(
|
| entryPoint: entryPoint,
|
| - resolutionInputs: serializedData.toUris(),
|
| - memorySourceFiles: serializedData.toMemorySourceFiles(
|
| - test != null ? test.sourceFiles : null),
|
| + resolutionInputs: resolutionInputs,
|
| + memorySourceFiles: sourceFiles,
|
| options: [Flags.analyzeOnly],
|
| diagnosticHandler: diagnosticCollector);
|
| if (test != null) {
|
|
|