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

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: Improve test precision 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..4073f40bd2ad3fd57e41af5876e6b009d1270316 100644
--- a/tests/compiler/dart2js/serialization_impact_test.dart
+++ b/tests/compiler/dart2js/serialization_impact_test.dart
@@ -47,15 +47,18 @@ Future check(
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);
}
}

Powered by Google App Engine
This is Rietveld 408576698