Skip to content

Commit 7559108

Browse files
FMorschelCommit Queue
authored andcommitted
[DAS] Tests for parameter highlights
[email protected] Bug: #60046 Change-Id: I5b57109e9459a8583fd543031f239174a71472cf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408040 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]> Auto-Submit: Felipe Morschel <[email protected]> Reviewed-by: Samuel Rawlins <[email protected]>
1 parent 8dab178 commit 7559108

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

pkg/analysis_server/test/lsp/document_highlights_test.dart

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,28 @@ void f() {
7272
/*[1*/x/*1]*/;
7373
}
7474
}
75+
''');
76+
77+
Future<void> test_formalParameters_closure() => _testMarkedContent('''
78+
void f(void Function(int) _) {}
79+
80+
void g() => f((/*[0*/^variable/*0]*/) {
81+
print(/*[1*/variable/*1]*/);
82+
});
83+
''');
84+
85+
Future<void> test_formalParameters_function() => _testMarkedContent('''
86+
void f(int /*[0*/^parameter/*0]*/) {
87+
print(/*[1*/parameter/*1]*/);
88+
}
89+
''');
90+
91+
Future<void> test_formalParameters_method() => _testMarkedContent('''
92+
class C {
93+
void m(int /*[0*/^parameter/*0]*/) {
94+
print(/*[1*/parameter/*1]*/);
95+
}
96+
}
7597
''');
7698

7799
Future<void> test_functions() => _testMarkedContent('''

0 commit comments

Comments
 (0)