| Index: pkg/analysis_server/test/services/completion/invocation_computer_test.dart
|
| diff --git a/pkg/analysis_server/test/services/completion/invocation_computer_test.dart b/pkg/analysis_server/test/services/completion/invocation_computer_test.dart
|
| index 6b9886bb68a8a478248db0a7a44a41f6347b82f3..4025bdbc2f93e7a858a7a302c6413b9167643bc8 100644
|
| --- a/pkg/analysis_server/test/services/completion/invocation_computer_test.dart
|
| +++ b/pkg/analysis_server/test/services/completion/invocation_computer_test.dart
|
| @@ -153,20 +153,6 @@ void f(C<int> c) {
|
| });
|
| }
|
|
|
| - test_param() {
|
| - addTestSource('foo(String x) {x.^}');
|
| - return computeFull((bool result) {
|
| - assertSuggestGetter('length', 'int');
|
| - });
|
| - }
|
| -
|
| - test_param_is() {
|
| - addTestSource('foo(x) {if (x is String) x.^}');
|
| - return computeFull((bool result) {
|
| - assertSuggestGetter('length', 'int');
|
| - });
|
| - }
|
| -
|
| test_method_parameters_mixed_required_and_named() {
|
| addTestSource('''
|
| class C {
|
| @@ -309,6 +295,92 @@ void main() {int y = new C().^}''');
|
| });
|
| }
|
|
|
| + test_only_instance() {
|
| + // SimpleIdentifier PropertyAccess ExpressionStatement
|
| + addTestSource('''
|
| +class C {
|
| + int f1;
|
| + static int f2;
|
| + m1() {}
|
| + static m2() {}
|
| +}
|
| +void main() {new C().^}''');
|
| + return computeFull((bool result) {
|
| + assertSuggestInvocationField('f1', 'int');
|
| + assertNotSuggested('f2');
|
| + assertSuggestMethod('m1', 'C', null);
|
| + assertNotSuggested('m2');
|
| + });
|
| + }
|
| +
|
| + test_only_instance2() {
|
| + // SimpleIdentifier MethodInvocation ExpressionStatement
|
| + addTestSource('''
|
| +class C {
|
| + int f1;
|
| + static int f2;
|
| + m1() {}
|
| + static m2() {}
|
| +}
|
| +void main() {new C().^ print("something");}''');
|
| + return computeFull((bool result) {
|
| + assertSuggestInvocationField('f1', 'int');
|
| + assertNotSuggested('f2');
|
| + assertSuggestMethod('m1', 'C', null);
|
| + assertNotSuggested('m2');
|
| + });
|
| + }
|
| +
|
| + test_only_static() {
|
| + // SimpleIdentifier PrefixedIdentifier ExpressionStatement
|
| + addTestSource('''
|
| +class C {
|
| + int f1;
|
| + static int f2;
|
| + m1() {}
|
| + static m2() {}
|
| +}
|
| +void main() {C.^}''');
|
| + return computeFull((bool result) {
|
| + assertNotSuggested('f1');
|
| + assertSuggestInvocationField('f2', 'int');
|
| + assertNotSuggested('m1');
|
| + assertSuggestMethod('m2', 'C', null);
|
| + });
|
| + }
|
| +
|
| + test_only_static2() {
|
| + // SimpleIdentifier MethodInvocation ExpressionStatement
|
| + addTestSource('''
|
| +class C {
|
| + int f1;
|
| + static int f2;
|
| + m1() {}
|
| + static m2() {}
|
| +}
|
| +void main() {C.^ print("something");}''');
|
| + return computeFull((bool result) {
|
| + assertNotSuggested('f1');
|
| + assertSuggestInvocationField('f2', 'int');
|
| + assertNotSuggested('m1');
|
| + assertSuggestMethod('m2', 'C', null);
|
| + });
|
| + }
|
| +
|
| + test_param() {
|
| + addTestSource('foo(String x) {x.^}');
|
| + return computeFull((bool result) {
|
| + assertSuggestGetter('length', 'int');
|
| + });
|
| + }
|
| +
|
| + test_param_is() {
|
| + addTestSource('foo(x) {if (x is String) x.^}');
|
| + return computeFull((bool result) {
|
| + assertSuggestGetter('length', 'int');
|
| + });
|
| + }
|
| +
|
| test_shadowing_field_over_field() =>
|
| check_shadowing('int x;', 'int x;', true);
|
|
|
|
|