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 163066044bf177fd0dcb7887b1d5a1f9fe21adb3..30fb59b87b46af2bf26718adac3f84d986abd9a0 100644 |
--- a/tests/compiler/dart2js/serialization/analysis_test.dart |
+++ b/tests/compiler/dart2js/serialization/analysis_test.dart |
@@ -14,23 +14,29 @@ import '../memory_compiler.dart'; |
import 'helper.dart'; |
import 'test_data.dart'; |
-main(List<String> arguments) { |
+main(List<String> args) { |
asyncTest(() async { |
- String serializedData = await serializeDartCore(); |
- |
- if (arguments.isNotEmpty) { |
- Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.last)); |
+ Arguments arguments = new Arguments.from(args); |
+ String serializedData = await serializeDartCore(arguments: arguments); |
+ if (arguments.filename != null) { |
+ Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename)); |
await analyze(serializedData, entryPoint, null); |
} else { |
Uri entryPoint = Uri.parse('memory:main.dart'); |
- for (Test test in TESTS) { |
+ await arguments.forEachTest(TESTS, (int index, Test test) async { |
await analyze(serializedData, entryPoint, test); |
- } |
+ }); |
} |
}); |
} |
-Future analyze(String serializedData, Uri entryPoint, Test test) async { |
+Future analyze(String serializedData, Uri entryPoint, Test test, |
+ {int index}) async { |
+ String testDescription = |
+ test != null ? test.sourceFiles[entryPoint.path] : '${entryPoint}'; |
+ print('------------------------------------------------------------------'); |
+ print('analyze ${index != null ? '$index:' :''}${testDescription}'); |
+ print('------------------------------------------------------------------'); |
DiagnosticCollector diagnosticCollector = new DiagnosticCollector(); |
await runCompiler( |
entryPoint: entryPoint, |