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

Unified Diff: tests/compiler/dart2js/serialization_resolved_ast_test.dart

Issue 1888803002: Support serialization of all resolved asts from dart:core (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix unittests. Created 4 years, 8 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
« no previous file with comments | « tests/compiler/dart2js/memory_compiler.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/serialization_resolved_ast_test.dart
diff --git a/tests/compiler/dart2js/serialization_resolved_ast_test.dart b/tests/compiler/dart2js/serialization_resolved_ast_test.dart
index af5d8a35c0835df87fedd9cebcc2253f007791e7..7712f9a44a1e64b061b1471c560149ea654ecbd1 100644
--- a/tests/compiler/dart2js/serialization_resolved_ast_test.dart
+++ b/tests/compiler/dart2js/serialization_resolved_ast_test.dart
@@ -20,11 +20,13 @@ import 'serialization_test_data.dart';
import 'serialization_test_helper.dart';
-main(List<String> arguments) {
+main(List<String> args) {
+ Arguments arguments = new Arguments.from(args);
asyncTest(() async {
- String serializedData = await serializeDartCore(serializeResolvedAst: true);
- if (arguments.isNotEmpty) {
- Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.last));
+ String serializedData = await serializeDartCore(
+ arguments: arguments, serializeResolvedAst: true);
+ if (arguments.filename != null) {
+ Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename));
await check(serializedData, entryPoint);
} else {
Uri entryPoint = Uri.parse('memory:main.dart');
@@ -43,13 +45,13 @@ Future check(
Compiler compilerNormal = compilerFor(
memorySourceFiles: sourceFiles,
- options: [Flags.analyzeOnly]);
+ options: [Flags.analyzeAll]);
compilerNormal.resolution.retainCachesForTesting = true;
await compilerNormal.run(entryPoint);
Compiler compilerDeserialized = compilerFor(
memorySourceFiles: sourceFiles,
- options: [Flags.analyzeOnly]);
+ options: [Flags.analyzeAll]);
compilerDeserialized.resolution.retainCachesForTesting = true;
deserialize(
compilerDeserialized, serializedData, deserializeResolvedAst: true);
@@ -69,7 +71,7 @@ void checkAllResolvedAsts(
return compiler1.resolution.hasResolvedAst(member1);
},
checkResolvedAsts,
- verbose: true);
+ verbose: verbose);
}
« no previous file with comments | « tests/compiler/dart2js/memory_compiler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698