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

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

Issue 1280313002: remove complex keyword suggestions - fixes #23978 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: update tests Created 5 years, 4 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/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/keyword_contributor_test.dart
diff --git a/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart b/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
index 6e12b911f588ce5c0ebf5ab8414563b6637f10a1..22747cdcb24b97fbd246d8cce33603a687418f87 100644
--- a/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
@@ -173,17 +173,6 @@ class KeywordContributorTest extends AbstractCompletionTest {
Keyword.TRUE,
];
- static final Map<String, List<String>> keywordTemplates =
- <String, List<String>>{
- Keyword.IMPORT.syntax: [
- "import '^';",
- "import '^' as ;",
- "import '^' hide ;",
- "import '^' show ;"
- ],
- Keyword.FOR.syntax: ['for (^)']
- };
-
void assertSuggestKeywords(Iterable<Keyword> expectedKeywords,
{List<String> pseudoKeywords: NO_PSEUDO_KEYWORDS,
int relevance: DART_RELEVANCE_KEYWORD}) {
@@ -192,18 +181,6 @@ class KeywordContributorTest extends AbstractCompletionTest {
Set<String> actualCompletions = new Set<String>();
expectedCompletions.addAll(expectedKeywords.map((k) => k.syntax));
expectedCompletions.addAll(pseudoKeywords);
- keywordTemplates.forEach((String key, List<String> templates) {
- if (expectedCompletions.remove(key)) {
- for (String t in templates) {
- int offset = t.indexOf('^');
- if (offset != -1) {
- t = '${t.substring(0, offset)}${t.substring(offset + 1)}';
- expectedOffsets[t] = offset;
- }
- expectedCompletions.add(t);
- }
- }
- });
for (CompletionSuggestion s in request.suggestions) {
if (s.kind == CompletionSuggestionKind.KEYWORD) {
Keyword k = Keyword.keywords[s.completion];
« no previous file with comments | « pkg/analysis_server/test/completion_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698