| Index: pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
|
| diff --git a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
|
| index 9edbe26b147558b50ca3ad974f450df5fed3192b..e617931231d0c1a055a40179739a39e2954f5f26 100644
|
| --- a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
|
| +++ b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
|
| @@ -331,7 +331,7 @@ void main() {expect(foo: ^)}''');
|
| assertNotSuggested('main');
|
| }
|
|
|
| - test_AsExpression() async {
|
| + test_AsExpression_type() async {
|
| // SimpleIdentifier TypeName AsExpression
|
| addTestSource('''
|
| class A {var b; X _c; foo() {var a; (a as ^).foo();}''');
|
| @@ -346,6 +346,38 @@ void main() {expect(foo: ^)}''');
|
| assertNotSuggested('==');
|
| }
|
|
|
| + test_AsExpression_type_filter_extends() async {
|
| + // SimpleIdentifier TypeName AsExpression
|
| + addTestSource('''
|
| +class A {} class B extends A {} class C extends A {} class D {}
|
| +f(A a){ (a as ^) }''');
|
| + await computeSuggestions();
|
| +
|
| + expect(replacementOffset, completionOffset);
|
| + expect(replacementLength, 0);
|
| + assertSuggestClass('B');
|
| + assertSuggestClass('C');
|
| + assertNotSuggested('A');
|
| + assertNotSuggested('D');
|
| + assertNotSuggested('Object');
|
| + }
|
| +
|
| + test_IsExpression_type_filter_implements() async {
|
| + // SimpleIdentifier TypeName AsExpression
|
| + addTestSource('''
|
| +class A {} class B implements A {} class C implements A {} class D {}
|
| +f(A a){ (a as ^) }''');
|
| + await computeSuggestions();
|
| +
|
| + expect(replacementOffset, completionOffset);
|
| + expect(replacementLength, 0);
|
| + assertSuggestClass('B');
|
| + assertSuggestClass('C');
|
| + assertNotSuggested('A');
|
| + assertNotSuggested('D');
|
| + assertNotSuggested('Object');
|
| + }
|
| +
|
| test_AssignmentExpression_name() async {
|
| // SimpleIdentifier VariableDeclaration VariableDeclarationList
|
| // VariableDeclarationStatement Block
|
| @@ -2750,7 +2782,7 @@ main(){var a; if (a is Obj^)}''');
|
| assertNotSuggested('Object');
|
| }
|
|
|
| - test_IsExpression_type_subtype_extends_filter() async {
|
| + test_IsExpression_type_filter_extends() async {
|
| // SimpleIdentifier TypeName IsExpression IfStatement
|
| addTestSource('''
|
| class A {} class B extends A {} class C extends A {} class D {}
|
|
|