| Index: pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
|
| diff --git a/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
|
| index 1f24c5a3b17e8be40b8de10ba24045d6f82e50d7..22e648d6150f5cefdbecb53bb1b23dfafc7e189c 100644
|
| --- a/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
|
| +++ b/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
|
| @@ -15,12 +15,14 @@ import 'completion_contributor_util.dart';
|
| main() {
|
| defineReflectiveSuite(() {
|
| defineReflectiveTests(TypeMemberContributorTest);
|
| - defineReflectiveTests(TypeMemberContributorTest_Driver);
|
| });
|
| }
|
|
|
| @reflectiveTest
|
| class TypeMemberContributorTest extends DartCompletionContributorTest {
|
| + @override
|
| + bool get enableNewAnalysisDriver => true;
|
| +
|
| /**
|
| * Check whether a declaration of the form [shadower] in a derived class
|
| * shadows a declaration of the form [shadowee] in a base class, for the
|
| @@ -64,6 +66,61 @@ void f(Derived d) {
|
| assertSuggestGetter('length', 'int');
|
| }
|
|
|
| + test_ArgDefaults_method() async {
|
| + addTestSource('''
|
| +class A {
|
| + bool a(int b, bool c) => false;
|
| +}
|
| +
|
| +void main() {new A().a^}''');
|
| + await computeSuggestions();
|
| +
|
| + assertSuggestMethod('a', 'A', 'bool', defaultArgListString: 'b, c');
|
| + }
|
| +
|
| + test_ArgDefaults_method_none() async {
|
| + addTestSource('''
|
| +class A {
|
| + bool a() => false;
|
| +}
|
| +
|
| +void main() {new A().a^}''');
|
| + await computeSuggestions();
|
| +
|
| + assertSuggestMethod('a', 'A', 'bool', defaultArgListString: null);
|
| + }
|
| +
|
| + test_ArgDefaults_method_with_optional_positional() async {
|
| + addMetaPackageSource();
|
| + addTestSource('''
|
| +import 'package:meta/meta.dart';
|
| +
|
| +class A {
|
| + bool foo(int bar, [bool boo, int baz]) => false;
|
| +}
|
| +
|
| +void main() {new A().f^}''');
|
| + await computeSuggestions();
|
| +
|
| + assertSuggestMethod('foo', 'A', 'bool', defaultArgListString: 'bar');
|
| + }
|
| +
|
| + test_ArgDefaults_method_with_required_named() async {
|
| + addMetaPackageSource();
|
| + addTestSource('''
|
| +import 'package:meta/meta.dart';
|
| +
|
| +class A {
|
| + bool foo(int bar, {bool boo, @required int baz}) => false;
|
| +}
|
| +
|
| +void main() {new A().f^}''');
|
| + await computeSuggestions();
|
| +
|
| + assertSuggestMethod('foo', 'A', 'bool',
|
| + defaultArgListString: 'bar, baz: null');
|
| + }
|
| +
|
| test_ArgumentList() async {
|
| // ArgumentList MethodInvocation ExpressionStatement Block
|
| addSource(
|
| @@ -4156,64 +4213,3 @@ class C1 extends C2 implements C3 {
|
| assertNotSuggested('e');
|
| }
|
| }
|
| -
|
| -@reflectiveTest
|
| -class TypeMemberContributorTest_Driver extends TypeMemberContributorTest {
|
| - @override
|
| - bool get enableNewAnalysisDriver => true;
|
| -
|
| - test_ArgDefaults_method() async {
|
| - addTestSource('''
|
| -class A {
|
| - bool a(int b, bool c) => false;
|
| -}
|
| -
|
| -void main() {new A().a^}''');
|
| - await computeSuggestions();
|
| -
|
| - assertSuggestMethod('a', 'A', 'bool', defaultArgListString: 'b, c');
|
| - }
|
| -
|
| - test_ArgDefaults_method_none() async {
|
| - addTestSource('''
|
| -class A {
|
| - bool a() => false;
|
| -}
|
| -
|
| -void main() {new A().a^}''');
|
| - await computeSuggestions();
|
| -
|
| - assertSuggestMethod('a', 'A', 'bool', defaultArgListString: null);
|
| - }
|
| -
|
| - test_ArgDefaults_method_with_optional_positional() async {
|
| - addMetaPackageSource();
|
| - addTestSource('''
|
| -import 'package:meta/meta.dart';
|
| -
|
| -class A {
|
| - bool foo(int bar, [bool boo, int baz]) => false;
|
| -}
|
| -
|
| -void main() {new A().f^}''');
|
| - await computeSuggestions();
|
| -
|
| - assertSuggestMethod('foo', 'A', 'bool', defaultArgListString: 'bar');
|
| - }
|
| -
|
| - test_ArgDefaults_method_with_required_named() async {
|
| - addMetaPackageSource();
|
| - addTestSource('''
|
| -import 'package:meta/meta.dart';
|
| -
|
| -class A {
|
| - bool foo(int bar, {bool boo, @required int baz}) => false;
|
| -}
|
| -
|
| -void main() {new A().f^}''');
|
| - await computeSuggestions();
|
| -
|
| - assertSuggestMethod('foo', 'A', 'bool',
|
| - defaultArgListString: 'bar, baz: null');
|
| - }
|
| -}
|
|
|