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

Unified Diff: pkg/analysis_server/test/analysis/notification_highlights_test2.dart

Issue 2484883002: Highlight FieldFormalParameterElement as a field only in declaration. (Closed)
Patch Set: Created 4 years, 1 month 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/analysis_server/lib/src/computer/computer_highlights2.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/analysis/notification_highlights_test2.dart
diff --git a/pkg/analysis_server/test/analysis/notification_highlights_test2.dart b/pkg/analysis_server/test/analysis/notification_highlights_test2.dart
index 2618777910ffc25e47e8f4b79f80f0a4be6b9a63..28568ef62631c1521f4d16f23f71d678d952adc0 100644
--- a/pkg/analysis_server/test/analysis/notification_highlights_test2.dart
+++ b/pkg/analysis_server/test/analysis/notification_highlights_test2.dart
@@ -911,6 +911,23 @@ main(int p) {
assertHasRegion(HighlightRegionType.PARAMETER_REFERENCE, 'p = 42');
}
+ test_PARAMETER_named() async {
+ addTestFile('''
+class C {
+ final int aaa;
+ C({this.aaa, int bbb});
+}
+main() {
+ new C(aaa: 1, bbb: 2);
+}
+''');
+ await prepareHighlights();
+ assertHasRegion(HighlightRegionType.INSTANCE_FIELD_REFERENCE, 'aaa,');
+ assertHasRegion(HighlightRegionType.PARAMETER_DECLARATION, 'bbb}');
+ assertHasRegion(HighlightRegionType.PARAMETER_REFERENCE, 'aaa: 1');
+ assertHasRegion(HighlightRegionType.PARAMETER_REFERENCE, 'bbb: 2');
+ }
+
test_SETTER_DECLARATION() async {
addTestFile('''
set aaa(x) {}
« no previous file with comments | « pkg/analysis_server/lib/src/computer/computer_highlights2.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698