Chromium Code Reviews| Index: pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart |
| diff --git a/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart |
| index 0bb27f97ad7773683fecd98e4e3c207b189f3af8..2e941249c51c525366d31064ac0f95219b5578a3 100644 |
| --- a/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart |
| +++ b/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart |
| @@ -3,7 +3,6 @@ |
| // BSD-style license that can be found in the LICENSE file. |
| import 'package:analysis_server/protocol/protocol_generated.dart'; |
| -import 'package:analysis_server/src/ide_options.dart'; |
| import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart'; |
| import 'package:analysis_server/src/services/completion/dart/arglist_contributor.dart'; |
| import 'package:test/test.dart'; |
| @@ -860,36 +859,9 @@ main() { f("16", radix: ^);}'''); |
| @reflectiveTest |
| class ArgListContributorTest_Driver extends ArgListContributorTest { |
| - final IdeOptions generateChildrenBoilerPlate = new IdeOptionsImpl() |
| - ..generateFlutterWidgetChildrenBoilerPlate = true; |
| - |
| @override |
| bool get enableNewAnalysisDriver => true; |
| - test_ArgumentList_Flutter_InstanceCreationExpression_0() async { |
| - configureFlutterPkg({ |
| - 'src/widgets/framework.dart': flutter_framework_code, |
| - }); |
| - |
| - addTestSource(''' |
| -import 'package:flutter/src/widgets/framework.dart'; |
| - |
| -build() => new Row( |
| - key: null, |
| - ^ |
| - ); |
| -'''); |
| - |
| - // Don't generate children boilerplate. |
| - await computeSuggestions(); |
| - |
| - assertSuggest('children: ,', |
| - csKind: CompletionSuggestionKind.NAMED_ARGUMENT, |
| - relevance: DART_RELEVANCE_NAMED_PARAMETER, |
| - defaultArgListString: null, // No default values. |
| - selectionOffset: 10); |
| - } |
| - |
| test_ArgumentList_Flutter_InstanceCreationExpression_01() async { |
| configureFlutterPkg({ |
| 'src/widgets/framework.dart': flutter_framework_code, |
| @@ -905,7 +877,6 @@ import 'package:flutter/src/widgets/framework.dart'; |
| ); |
| '''); |
| - // Don't generate children boilerplate. |
| await computeSuggestions(); |
| assertSuggest('color: ,', |
| @@ -915,7 +886,7 @@ import 'package:flutter/src/widgets/framework.dart'; |
| selectionOffset: 7); |
| } |
| - test_ArgumentList_Flutter_InstanceCreationExpression_1() async { |
| + test_ArgumentList_Flutter_InstanceCreationExpression_0() async { |
| configureFlutterPkg({ |
| 'src/widgets/framework.dart': flutter_framework_code, |
| }); |
| @@ -924,22 +895,21 @@ import 'package:flutter/src/widgets/framework.dart'; |
| import 'package:flutter/src/widgets/framework.dart'; |
| build() => new Row( |
| - key: null, |
| ^ |
| ); |
| '''); |
| - await computeSuggestions(options: generateChildrenBoilerPlate); |
| + await computeSuggestions(); |
| - assertSuggest('children: ,', |
| + assertSuggest('children: <Widget>[],', |
| csKind: CompletionSuggestionKind.NAMED_ARGUMENT, |
| relevance: DART_RELEVANCE_NAMED_PARAMETER, |
| - defaultArgListString: 'children: <Widget>[],', |
| - selectionOffset: 10, |
| - defaultArgumentListTextRanges: [10, 10]); |
| + defaultArgListString: null, |
|
Brian Wilkerson
2017/05/02 20:25:28
Should we remove these fields from the spec?
pquitslund
2017/05/02 20:48:24
They're still used when we generate Constructor/Me
|
| + selectionOffset: 19, |
| + defaultArgumentListTextRanges: null); |
| } |
| - test_ArgumentList_Flutter_InstanceCreationExpression_2() async { |
| + test_ArgumentList_Flutter_InstanceCreationExpression_1() async { |
| configureFlutterPkg({ |
| 'src/widgets/framework.dart': flutter_framework_code, |
| }); |
| @@ -948,22 +918,22 @@ build() => new Row( |
| import 'package:flutter/src/widgets/framework.dart'; |
| build() => new Row( |
| - ^ |
| key: null, |
| + ^ |
| ); |
| '''); |
| - await computeSuggestions(options: generateChildrenBoilerPlate); |
| + await computeSuggestions(); |
| - assertSuggest('children: ,', |
| + assertSuggest('children: <Widget>[],', |
| csKind: CompletionSuggestionKind.NAMED_ARGUMENT, |
| relevance: DART_RELEVANCE_NAMED_PARAMETER, |
| - defaultArgListString: 'children: <Widget>[],', |
| - selectionOffset: 10, |
| - defaultArgumentListTextRanges: [10, 10]); |
| + defaultArgListString: null, |
| + selectionOffset: 19, |
| + defaultArgumentListTextRanges: null); |
| } |
| - test_ArgumentList_Flutter_InstanceCreationExpression_children() async { |
| + test_ArgumentList_Flutter_InstanceCreationExpression_2() async { |
| configureFlutterPkg({ |
| 'src/widgets/framework.dart': flutter_framework_code, |
| }); |
| @@ -971,19 +941,20 @@ build() => new Row( |
| addTestSource(''' |
| import 'package:flutter/src/widgets/framework.dart'; |
| -build() => new Container( |
| - child: new Row(^); |
| +build() => new Row( |
| + ^ |
| + key: null, |
| ); |
| '''); |
| - await computeSuggestions(options: generateChildrenBoilerPlate); |
| + await computeSuggestions(); |
| - assertSuggest('children: ,', |
| + assertSuggest('children: <Widget>[],', |
| csKind: CompletionSuggestionKind.NAMED_ARGUMENT, |
| relevance: DART_RELEVANCE_NAMED_PARAMETER, |
| - defaultArgListString: 'children: <Widget>[],', |
| - selectionOffset: 10, |
| - defaultArgumentListTextRanges: [10, 10]); |
| + defaultArgListString: null, |
| + selectionOffset: 19, |
| + defaultArgumentListTextRanges: null); |
| } |
| test_ArgumentList_Flutter_InstanceCreationExpression_children_dynamic() async { |
| @@ -1002,13 +973,14 @@ build() => new Container( |
| ); |
| '''); |
| - await computeSuggestions(options: generateChildrenBoilerPlate); |
| + await computeSuggestions(); |
| - assertSuggest('children: ,', |
| + assertSuggest('children: [],', |
| csKind: CompletionSuggestionKind.NAMED_ARGUMENT, |
| relevance: DART_RELEVANCE_NAMED_PARAMETER, |
| - selectionOffset: 10, |
| - defaultArgListString: 'children: [],'); |
| + defaultArgListString: null, |
| + selectionOffset: 11, |
| + defaultArgumentListTextRanges: null); |
| } |
| test_ArgumentList_Flutter_InstanceCreationExpression_children_Map() async { |
| @@ -1026,7 +998,7 @@ build() => new Container( |
| ); |
| '''); |
| - await computeSuggestions(options: generateChildrenBoilerPlate); |
| + await computeSuggestions(); |
| assertSuggest('children: ,', |
| csKind: CompletionSuggestionKind.NAMED_ARGUMENT, |
| @@ -1049,7 +1021,7 @@ main() { |
| foo(^); |
| '''); |
| - await computeSuggestions(options: generateChildrenBoilerPlate); |
| + await computeSuggestions(); |
| assertSuggest('children: ', |
| csKind: CompletionSuggestionKind.NAMED_ARGUMENT, |