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

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

Issue 2124773002: Support enclosingClass on deserialized local elements (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Check local functions from implementation. Created 4 years, 5 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 | « pkg/compiler/lib/src/serialization/modelz.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/model_test_helper.dart
diff --git a/tests/compiler/dart2js/serialization/model_test_helper.dart b/tests/compiler/dart2js/serialization/model_test_helper.dart
index 2c6d86176b2d8109ef0e25b8b69bfd4fc5b20e2f..e9bd90afe830cbd397ef5b972b311c0a6d638255 100644
--- a/tests/compiler/dart2js/serialization/model_test_helper.dart
+++ b/tests/compiler/dart2js/serialization/model_test_helper.dart
@@ -182,6 +182,24 @@ void checkElements(
"$element1.variablesUsedInTryOrGenerator",
areLocalsEquivalent,
verbose: verbose);
+ if (element1 is MemberElement && element2 is MemberElement) {
+ MemberElement member1 = element1.implementation;
+ MemberElement member2 = element2.implementation;
+ checkSets(
+ member1.nestedClosures,
+ member2.nestedClosures,
+ "$member1.nestedClosures",
+ areElementsEquivalent,
+ verbose: verbose,
+ onSameElement: (a, b) {
+ LocalFunctionElement localFunction1 = a.expression;
+ LocalFunctionElement localFunction2 = b.expression;
+ checkElementIdentities(
+ localFunction1, localFunction2,
+ 'enclosingClass',
+ localFunction1.enclosingClass, localFunction2.enclosingClass);
+ });
+ }
}
JavaScriptBackend backend1 = compiler1.backend;
JavaScriptBackend backend2 = compiler2.backend;
« no previous file with comments | « pkg/compiler/lib/src/serialization/modelz.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698