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

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

Issue 1891193003: Fix serialization of forwarding constructors. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: dartfmt 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/serialization_helper.dart ('k') | tests/compiler/dart2js/serialization_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/serialization_impact_test.dart
diff --git a/tests/compiler/dart2js/serialization_impact_test.dart b/tests/compiler/dart2js/serialization_impact_test.dart
index 05d91d6dd981f8366432a33079a4365e3da03567..6f5fd15ce3ea70c8b51e9bb635a0efbe3b11a157 100644
--- a/tests/compiler/dart2js/serialization_impact_test.dart
+++ b/tests/compiler/dart2js/serialization_impact_test.dart
@@ -16,15 +16,18 @@ import 'memory_compiler.dart';
import 'serialization_helper.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();
- if (arguments.isNotEmpty) {
- Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.last));
+ String serializedData = await serializeDartCore(arguments: arguments);
+ if (arguments.filename != null) {
+ Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename));
await check(serializedData, entryPoint);
} else {
Uri entryPoint = Uri.parse('memory:main.dart');
- await check(serializedData, entryPoint, {'main.dart': 'main() {}'});
+ await check(serializedData, entryPoint,
+ sourceFiles: {'main.dart': 'main() {}'},
+ verbose: arguments.verbose);
}
});
}
@@ -32,20 +35,21 @@ main(List<String> arguments) {
Future check(
String serializedData,
Uri entryPoint,
- [Map<String, String> sourceFiles = const <String, String>{}]) async {
+ {Map<String, String> sourceFiles: const <String, String>{},
+ bool verbose: false}) async {
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);
await compilerDeserialized.run(entryPoint);
- checkAllImpacts(compilerNormal, compilerDeserialized, verbose: true);
+ checkAllImpacts(compilerNormal, compilerDeserialized, verbose: verbose);
}
« no previous file with comments | « tests/compiler/dart2js/serialization_helper.dart ('k') | tests/compiler/dart2js/serialization_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698