File tree 5 files changed +211
-177
lines changed
pkg/analysis_server/test/services/completion/dart 5 files changed +211
-177
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -96,6 +96,8 @@ class CompletionResponsePrinter {
96
96
return 'extension' ;
97
97
} else if (elementKind == ElementKind .FIELD ) {
98
98
return 'field' ;
99
+ } else if (elementKind == ElementKind .FUNCTION ) {
100
+ return 'function' ;
99
101
} else if (elementKind == ElementKind .GETTER ) {
100
102
return 'getter' ;
101
103
} else if (elementKind == ElementKind .LIBRARY ) {
Original file line number Diff line number Diff line change @@ -1114,10 +1114,36 @@ suggestions
1114
1114
mixin MethodBodyTestCases on AbstractCompletionDriverTest {
1115
1115
Future <void > test_afterLeftBrace_beforeRightBrace () async {
1116
1116
await computeSuggestions ('''
1117
- class A { foo() {^}}
1117
+ class F0 { var f1; f2() {} }
1118
+ class E0 extends F0 { var e1; e2() {} }
1119
+ class I0 { int i1; i2() {} }
1120
+ class M0 { var m1; int m2() {} }
1121
+ class A0 extends E0 implements I0 with M0 {a() {^}}
1118
1122
''' );
1123
+ // Part of the purpose of this test is to ensure that none of the top-level
1124
+ // names are duplicated.
1119
1125
assertResponse (r'''
1120
1126
suggestions
1127
+ A0
1128
+ kind: class
1129
+ A0
1130
+ kind: constructorInvocation
1131
+ E0
1132
+ kind: class
1133
+ E0
1134
+ kind: constructorInvocation
1135
+ F0
1136
+ kind: class
1137
+ F0
1138
+ kind: constructorInvocation
1139
+ I0
1140
+ kind: class
1141
+ I0
1142
+ kind: constructorInvocation
1143
+ M0
1144
+ kind: class
1145
+ M0
1146
+ kind: constructorInvocation
1121
1147
assert
1122
1148
kind: keyword
1123
1149
const
@@ -1126,14 +1152,30 @@ suggestions
1126
1152
kind: keyword
1127
1153
dynamic
1128
1154
kind: keyword
1155
+ e1
1156
+ kind: field
1157
+ e2
1158
+ kind: methodInvocation
1159
+ f1
1160
+ kind: field
1161
+ f2
1162
+ kind: methodInvocation
1129
1163
final
1130
1164
kind: keyword
1131
1165
for
1132
1166
kind: keyword
1167
+ i1
1168
+ kind: field
1169
+ i2
1170
+ kind: methodInvocation
1133
1171
if
1134
1172
kind: keyword
1135
1173
late
1136
1174
kind: keyword
1175
+ m1
1176
+ kind: field
1177
+ m2
1178
+ kind: methodInvocation
1137
1179
return
1138
1180
kind: keyword
1139
1181
super
You can’t perform that action at this time.
0 commit comments