Skip to content

Commit 4f4ba74

Browse files
pqCommit Queue
authored and
Commit Queue
committed
[wildcards] implementation marker tests
See: #55681 Change-Id: I29afe39dd293e2e9da67791ad92f3d6d8356493e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381807 Commit-Queue: Phil Quitslund <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
1 parent 63ccfe8 commit 4f4ba74

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

pkg/analysis_server/test/lsp/implementation_test.dart

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ class ImplementationTest extends AbstractLspAnalysisServerTest {
3636
class /*[1*/C/*1]*/ extends A {}
3737
''');
3838

39+
Future<void> test_class_sub_underscore() => _testMarkedContent('''
40+
abstract class ^_ {}
41+
class /*[0*/B/*0]*/ extends _ {}
42+
class /*[1*/C/*1]*/ extends _ {}
43+
''');
44+
3945
Future<void> test_class_subSub() => _testMarkedContent('''
4046
abstract class ^A {}
4147
class /*[0*/B/*0]*/ extends A {}
@@ -68,6 +74,17 @@ class ImplementationTest extends AbstractLspAnalysisServerTest {
6874
}
6975
''');
7076

77+
Future<void> test_getter_overriddenByField_underscore() =>
78+
_testMarkedContent('''
79+
class B extends A {
80+
final String? [!_!] = null;
81+
}
82+
83+
abstract class A {
84+
String? get _^;
85+
}
86+
''');
87+
7188
Future<void> test_method_excludesClassesWithoutImplementations() =>
7289
_testMarkedContent('''
7390
abstract class A {
@@ -162,6 +179,20 @@ class ImplementationTest extends AbstractLspAnalysisServerTest {
162179
}
163180
''');
164181

182+
Future<void> test_method_sub_underscore() => _testMarkedContent('''
183+
abstract class A {
184+
void ^_();
185+
}
186+
187+
class B extends A {
188+
void /*[0*/_/*0]*/() {}
189+
}
190+
191+
class C extends A {
192+
void /*[1*/_/*1]*/() {}
193+
}
194+
''');
195+
165196
Future<void> test_method_subSub() => _testMarkedContent('''
166197
abstract class A {
167198
void ^b();

0 commit comments

Comments
 (0)