Chromium Code Reviews| Index: tests/compiler/dart2js/serialization/model_test.dart |
| diff --git a/tests/compiler/dart2js/serialization/model_test.dart b/tests/compiler/dart2js/serialization/model_test.dart |
| index 2ab28e9eee59521b15d555c95d41a69199162c78..160bfb24bb89ea10050efb634ee7735424328721 100644 |
| --- a/tests/compiler/dart2js/serialization/model_test.dart |
| +++ b/tests/compiler/dart2js/serialization/model_test.dart |
| @@ -28,33 +28,31 @@ main(List<String> args) { |
| await serializeDartCore(arguments: arguments); |
| if (arguments.filename != null) { |
| Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename)); |
| - await checkModels(serializedData, entryPoint); |
| + await checkModels(entryPoint, |
| + sourceFiles: serializedData.toMemorySourceFiles(), |
| + resolutionInputs: serializedData.toUris()); |
| } else { |
| Uri entryPoint = Uri.parse('memory:main.dart'); |
| - arguments.forEachTest(TESTS, (int index, Test test) async { |
| - print('=============================================================='); |
| - print(test.sourceFiles); |
| - await checkModels( |
| - serializedData, |
| - entryPoint, |
| - memorySourceFiles: test.sourceFiles, |
| - verbose: arguments.verbose); |
| - }); |
| + arguments.forEachTest(serializedData, TESTS, checkModels); |
| } |
| }); |
| } |
| Future checkModels( |
| - SerializedData serializedData, |
| Uri entryPoint, |
| - {Map<String, String> memorySourceFiles: const <String, String>{}, |
| - bool verbose: false}) async { |
| + {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}'; |
| print('------------------------------------------------------------------'); |
| - print('compile normal'); |
| + print('compile normal ${index != null ? '$index: ' :''}${testDescription}'); |
|
Siggi Cherem (dart-lang)
2016/05/25 17:24:32
maybe define
String id = index ?? ''; (or index =
Johnni Winther
2016/05/26 10:56:37
Done.
|
| print('------------------------------------------------------------------'); |
| Compiler compilerNormal = compilerFor( |
| - memorySourceFiles: memorySourceFiles, |
| + memorySourceFiles: sourceFiles, |
| options: [Flags.analyzeOnly]); |
| compilerNormal.resolution.retainCachesForTesting = true; |
| await compilerNormal.run(entryPoint); |
| @@ -63,11 +61,12 @@ Future checkModels( |
| compilerNormal.backend.onResolutionComplete(); |
| print('------------------------------------------------------------------'); |
| - print('compile deserialized'); |
| + print('compile deserialized ' |
| + '${index != null ? '$index: ' :''}${testDescription}'); |
| print('------------------------------------------------------------------'); |
| Compiler compilerDeserialized = compilerFor( |
| - memorySourceFiles: serializedData.toMemorySourceFiles(memorySourceFiles), |
| - resolutionInputs: serializedData.toUris(), |
| + memorySourceFiles: sourceFiles, |
| + resolutionInputs: resolutionInputs, |
| options: [Flags.analyzeOnly]); |
| compilerDeserialized.resolution.retainCachesForTesting = true; |
| await compilerDeserialized.run(entryPoint); |