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

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

Issue 1856953003: Test closed world model after deserialization. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. 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
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 0bd48338f8f483e8f7eae25ace0227e0058feb5d..2fbd212a1729239aa99cc4720c3dc1923e98a0ff 100644
--- a/tests/compiler/dart2js/serialization_impact_test.dart
+++ b/tests/compiler/dart2js/serialization_impact_test.dart
@@ -37,25 +37,28 @@ Future check(
Compiler compilerNormal = compilerFor(
memorySourceFiles: sourceFiles,
options: [Flags.analyzeOnly]);
- compilerNormal.resolution.retainCaches = true;
+ compilerNormal.resolution.retainCachesForTesting = true;
await compilerNormal.run(entryPoint);
Compiler compilerDeserialized = compilerFor(
memorySourceFiles: sourceFiles,
options: [Flags.analyzeOnly]);
- compilerDeserialized.resolution.retainCaches = true;
+ compilerDeserialized.resolution.retainCachesForTesting = true;
deserialize(compilerDeserialized, serializedData);
await compilerDeserialized.run(entryPoint);
- checkResolutionImpacts(compilerNormal, compilerDeserialized);
+ checkResolutionImpacts(compilerNormal, compilerDeserialized, verbose: true);
}
/// Check equivalence of [impact1] and [impact2].
void checkImpacts(Element element1, Element element2,
- ResolutionImpact impact1, ResolutionImpact impact2) {
+ ResolutionImpact impact1, ResolutionImpact impact2,
+ {bool verbose: false}) {
if (impact1 == null || impact2 == null) return;
- print('Checking impacts for $element1 vs $element2');
+ if (verbose) {
+ print('Checking impacts for $element1 vs $element2');
+ }
testResolutionImpactEquivalence(impact1, impact2, const CheckStrategy());
}
@@ -63,7 +66,10 @@ void checkImpacts(Element element1, Element element2,
/// Check equivalence between all resolution impacts common to [compiler1] and
/// [compiler2].
-void checkResolutionImpacts(Compiler compiler1, Compiler compiler2) {
+void checkResolutionImpacts(
+ Compiler compiler1,
+ Compiler compiler2,
+ {bool verbose: false}) {
void checkMembers(Element member1, Element member2) {
if (member1.isClass && member2.isClass) {
@@ -87,7 +93,8 @@ void checkResolutionImpacts(Compiler compiler1, Compiler compiler2) {
checkImpacts(
member1, member2,
compiler1.resolution.getResolutionImpact(member1),
- compiler2.serialization.deserializer.getResolutionImpact(member2));
+ compiler2.serialization.deserializer.getResolutionImpact(member2),
+ verbose: verbose);
}
}
« no previous file with comments | « tests/compiler/dart2js/serialization_analysis_test.dart ('k') | tests/compiler/dart2js/serialization_model_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698