| Index: pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
|
| diff --git a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
|
| index 6960b2c219cb7a290fd1390ae5639afbad55722f..7bb98116ad1a0faea90c5c4ba1355cbf7b2d9a40 100644
|
| --- a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
|
| +++ b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
|
| @@ -20,12 +20,17 @@ import 'completion_contributor_util.dart';
|
| main() {
|
| defineReflectiveSuite(() {
|
| defineReflectiveTests(ImportedReferenceContributorTest);
|
| - defineReflectiveTests(ImportedReferenceContributorTest_Driver);
|
| });
|
| }
|
|
|
| @reflectiveTest
|
| class ImportedReferenceContributorTest extends DartCompletionContributorTest {
|
| + final IdeOptions generateChildrenBoilerPlate = new IdeOptionsImpl()
|
| + ..generateFlutterWidgetChildrenBoilerPlate = true;
|
| +
|
| + @override
|
| + bool get enableNewAnalysisDriver => true;
|
| +
|
| @override
|
| bool get isNullExpectedReturnTypeConsideredDynamic => false;
|
|
|
| @@ -34,6 +39,51 @@ class ImportedReferenceContributorTest extends DartCompletionContributorTest {
|
| return new ImportedReferenceContributor();
|
| }
|
|
|
| + test_ArgDefaults_Flutter_cons_with_children() async {
|
| + addMetaPackageSource();
|
| +
|
| + configureFlutterPkg({
|
| + 'src/widgets/framework.dart': flutter_framework_code,
|
| + });
|
| +
|
| + addTestSource('''
|
| +import 'package:flutter/src/widgets/framework.dart';
|
| +
|
| +build() => new Container(
|
| + child: new Row^
|
| + );
|
| +''');
|
| +
|
| + await computeSuggestions(options: generateChildrenBoilerPlate);
|
| +
|
| + assertSuggestConstructor("Row",
|
| + defaultArgListString: "children: <Widget>[]",
|
| + defaultArgumentListTextRanges: [10, 10]);
|
| + }
|
| +
|
| + /// Sanity check. Permutations tested in local_ref_contributor.
|
| + test_ArgDefaults_function_with_required_named() async {
|
| + addMetaPackageSource();
|
| +
|
| + resolveSource(
|
| + '/testB.dart',
|
| + '''
|
| +lib B;
|
| +import 'package:meta/meta.dart';
|
| +
|
| +bool foo(int bar, {bool boo, @required int baz}) => false;
|
| +''');
|
| +
|
| + addTestSource('''
|
| +import "/testB.dart";
|
| +
|
| +void main() {f^}''');
|
| + await computeSuggestions();
|
| +
|
| + assertSuggestFunction('foo', 'bool',
|
| + defaultArgListString: 'bar, baz: null');
|
| + }
|
| +
|
| test_ArgumentList() async {
|
| // ArgumentList MethodInvocation ExpressionStatement Block
|
| resolveSource(
|
| @@ -1957,7 +2007,6 @@ int myFunc() {}
|
| assertNotSuggested('two');
|
| }
|
|
|
| - @failingTest
|
| test_enum_deprecated() async {
|
| addSource('/libA.dart', 'library A; @deprecated enum E { one, two }');
|
| addTestSource('import "/libA.dart"; main() {^}');
|
| @@ -4510,63 +4559,3 @@ class B extends A {
|
| assertNotSuggested('e');
|
| }
|
| }
|
| -
|
| -@reflectiveTest
|
| -class ImportedReferenceContributorTest_Driver
|
| - extends ImportedReferenceContributorTest {
|
| - final IdeOptions generateChildrenBoilerPlate = new IdeOptionsImpl()
|
| - ..generateFlutterWidgetChildrenBoilerPlate = true;
|
| -
|
| - @override
|
| - bool get enableNewAnalysisDriver => true;
|
| -
|
| - test_ArgDefaults_Flutter_cons_with_children() async {
|
| - addMetaPackageSource();
|
| -
|
| - configureFlutterPkg({
|
| - 'src/widgets/framework.dart': flutter_framework_code,
|
| - });
|
| -
|
| - addTestSource('''
|
| -import 'package:flutter/src/widgets/framework.dart';
|
| -
|
| -build() => new Container(
|
| - child: new Row^
|
| - );
|
| -''');
|
| -
|
| - await computeSuggestions(options: generateChildrenBoilerPlate);
|
| -
|
| - assertSuggestConstructor("Row",
|
| - defaultArgListString: "children: <Widget>[]",
|
| - defaultArgumentListTextRanges: [10, 10]);
|
| - }
|
| -
|
| - /// Sanity check. Permutations tested in local_ref_contributor.
|
| - test_ArgDefaults_function_with_required_named() async {
|
| - addMetaPackageSource();
|
| -
|
| - resolveSource(
|
| - '/testB.dart',
|
| - '''
|
| -lib B;
|
| -import 'package:meta/meta.dart';
|
| -
|
| -bool foo(int bar, {bool boo, @required int baz}) => false;
|
| -''');
|
| -
|
| - addTestSource('''
|
| -import "/testB.dart";
|
| -
|
| -void main() {f^}''');
|
| - await computeSuggestions();
|
| -
|
| - assertSuggestFunction('foo', 'bool',
|
| - defaultArgListString: 'bar, baz: null');
|
| - }
|
| -
|
| - @override
|
| - test_enum_deprecated() {
|
| - // TODO(scheglov) remove it?
|
| - }
|
| -}
|
|
|