Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(790)

Side by Side Diff: pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart

Issue 2849703002: Fix following comma detection in code completion (#29503). (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.services.completion.dart.arglist; 5 library test.services.completion.dart.arglist;
6 6
7 import 'package:analysis_server/plugin/protocol/protocol.dart'; 7 import 'package:analysis_server/plugin/protocol/protocol.dart';
8 import 'package:analysis_server/src/ide_options.dart'; 8 import 'package:analysis_server/src/ide_options.dart';
9 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart'; 9 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart';
10 import 'package:analysis_server/src/services/completion/dart/arglist_contributor .dart'; 10 import 'package:analysis_server/src/services/completion/dart/arglist_contributor .dart';
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 // Don't generate children boilerplate. 885 // Don't generate children boilerplate.
886 await computeSuggestions(); 886 await computeSuggestions();
887 887
888 assertSuggest('children: ,', 888 assertSuggest('children: ,',
889 csKind: CompletionSuggestionKind.NAMED_ARGUMENT, 889 csKind: CompletionSuggestionKind.NAMED_ARGUMENT,
890 relevance: DART_RELEVANCE_NAMED_PARAMETER, 890 relevance: DART_RELEVANCE_NAMED_PARAMETER,
891 defaultArgListString: null, // No default values. 891 defaultArgListString: null, // No default values.
892 selectionOffset: 10); 892 selectionOffset: 10);
893 } 893 }
894 894
895 test_ArgumentList_Flutter_InstanceCreationExpression_01() async {
896 configureFlutterPkg({
897 'src/widgets/framework.dart': flutter_framework_code,
898 });
899
900 addTestSource('''
901 import 'package:flutter/src/widgets/framework.dart';
902
903 build() => new Scaffold(
904 appBar: new AppBar(
905 ^
906 ),
907 );
908 ''');
909
910 // Don't generate children boilerplate.
911 await computeSuggestions();
912
913 assertSuggest('color: ,',
914 csKind: CompletionSuggestionKind.NAMED_ARGUMENT,
915 relevance: DART_RELEVANCE_NAMED_PARAMETER,
916 defaultArgListString: null, // No default values.
917 selectionOffset: 7);
918 }
919
895 test_ArgumentList_Flutter_InstanceCreationExpression_1() async { 920 test_ArgumentList_Flutter_InstanceCreationExpression_1() async {
896 configureFlutterPkg({ 921 configureFlutterPkg({
897 'src/widgets/framework.dart': flutter_framework_code, 922 'src/widgets/framework.dart': flutter_framework_code,
898 }); 923 });
899 924
900 addTestSource(''' 925 addTestSource('''
901 import 'package:flutter/src/widgets/framework.dart'; 926 import 'package:flutter/src/widgets/framework.dart';
902 927
903 build() => new Row( 928 build() => new Row(
904 key: null, 929 key: null,
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 '''); 1052 ''');
1028 1053
1029 await computeSuggestions(options: generateChildrenBoilerPlate); 1054 await computeSuggestions(options: generateChildrenBoilerPlate);
1030 1055
1031 assertSuggest('children: ', 1056 assertSuggest('children: ',
1032 csKind: CompletionSuggestionKind.NAMED_ARGUMENT, 1057 csKind: CompletionSuggestionKind.NAMED_ARGUMENT,
1033 relevance: DART_RELEVANCE_NAMED_PARAMETER, 1058 relevance: DART_RELEVANCE_NAMED_PARAMETER,
1034 defaultArgListString: null); 1059 defaultArgListString: null);
1035 } 1060 }
1036 } 1061 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698