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

Unified Diff: tests/compiler/dart2js/serialization/analysis_test.dart

Issue 1994613004: Handle use of constant constructors with default values. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment Created 4 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/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,
« no previous file with comments | « pkg/compiler/lib/src/serialization/modelz.dart ('k') | tests/compiler/dart2js/serialization/compilation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698