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

Unified Diff: pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart

Issue 2136223004: Don't insert additional ':' when changing a named argument name. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/test/domain_completion_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 db178595d3a7940e5b06b3157098a4e80c49fd4a..44ddc2a25b1cd32a82ea5e78aae685988a71d3fa 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
@@ -81,10 +81,11 @@ class ArgListContributorTest extends DartCompletionContributorTest {
* the only suggestions.
*/
void assertSuggestArgumentsAndTypes(
- {Map<String, String> namedArgumentsWithTypes}) {
+ {Map<String, String> namedArgumentsWithTypes, bool includeColon: true}) {
List<CompletionSuggestion> expected = new List<CompletionSuggestion>();
namedArgumentsWithTypes.forEach((String name, String type) {
- expected.add(assertSuggest('$name: ',
+ String completion = includeColon ? '$name: ' : name;
+ expected.add(assertSuggest(completion,
csKind: CompletionSuggestionKind.NAMED_ARGUMENT,
relevance: DART_RELEVANCE_NAMED_PARAMETER,
paramName: name,
@@ -432,7 +433,8 @@ class A { const A(int one, int two, int three, {int four, String five:
addTestSource('main() { int.parse("16", r^: 16);}');
await computeSuggestions();
assertSuggestArgumentsAndTypes(
- namedArgumentsWithTypes: {'radix': 'int', 'onError': '(String) → int'});
+ namedArgumentsWithTypes: {'radix': 'int', 'onError': '(String) → int'},
+ includeColon: false);
}
test_ArgumentList_imported_function_named_param_label2() async {
« no previous file with comments | « pkg/analysis_server/test/domain_completion_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698