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

Unified Diff: pkg/analyzer/test/src/summary/resynthesize_test.dart

Issue 1603643007: Properly resynthesize field formal parameter elements. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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/analyzer/lib/src/summary/resynthesize.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/resynthesize_test.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_test.dart b/pkg/analyzer/test/src/summary/resynthesize_test.dart
index 945d4ebcd01146487d2f4c4a64144527422666bb..e977fa6e5e87f3bce66e3e144d0c88855b873b48 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
@@ -354,6 +354,20 @@ class ResynthTest extends ResolverTestCase {
'$desc parameter ${original.parameters[i].name}');
}
expect(resynthesized.parameterKind, original.parameterKind);
+ expect(resynthesized.isInitializingFormal, original.isInitializingFormal,
+ reason: desc);
+ expect(resynthesized is FieldFormalParameterElementImpl,
+ original is FieldFormalParameterElementImpl);
+ if (resynthesized is FieldFormalParameterElementImpl &&
+ original is FieldFormalParameterElementImpl) {
+ if (original.field == null) {
+ expect(resynthesized.field, isNull, reason: '$desc field');
+ } else {
+ expect(resynthesized.field, isNotNull, reason: '$desc field');
+ compareFieldElements(
+ resynthesized.field, original.field, '$desc field');
+ }
+ }
}
void comparePrefixElements(PrefixElementImpl resynthesized,
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698