Chromium Code Reviews| Index: pkg/analysis_server/test/services/completion/completion_test_util.dart |
| diff --git a/pkg/analysis_server/test/services/completion/completion_test_util.dart b/pkg/analysis_server/test/services/completion/completion_test_util.dart |
| index 6e76a4e444902b36b1d3edf9dc354c4f3a20c211..83ca4e57107a4edbd0f9f4a17d1ee5f17560f0f8 100644 |
| --- a/pkg/analysis_server/test/services/completion/completion_test_util.dart |
| +++ b/pkg/analysis_server/test/services/completion/completion_test_util.dart |
| @@ -65,7 +65,8 @@ abstract class AbstractCompletionTest extends AbstractContextTest { |
| content.substring(completionOffset + 1); |
| testSource = addSource(testFile, content); |
| cache = new DartCompletionCache(context, testSource); |
| - AnalysisServer server = new AnalysisServerMock(searchEngine: searchEngine, resourceProvider: provider); |
| + AnalysisServer server = new AnalysisServerMock( |
| + searchEngine: searchEngine, resourceProvider: provider); |
| request = new DartCompletionRequest( |
| server, context, testSource, completionOffset, cache); |
| } |
| @@ -552,6 +553,26 @@ abstract class AbstractSelectorSuggestionTest extends AbstractCompletionTest { |
| // Subclasses override |
| } |
| + CompletionSuggestion assertSuggestEnum(String completion, |
| + {bool isDeprecated: false}) { |
| + CompletionSuggestion suggestion = |
| + assertSuggest(completion, isDeprecated: isDeprecated); |
| + expect(suggestion.isDeprecated, isDeprecated); |
| + expect(suggestion.element.kind, protocol.ElementKind.ENUM); |
| + return suggestion; |
| + } |
| + |
| + CompletionSuggestion assertSuggestEnumConst(String completion, |
| + {bool isDeprecated: false}) { |
| + CompletionSuggestion suggestion = |
| + assertSuggest(completion, isDeprecated: isDeprecated); |
| + expect(suggestion.isDeprecated, isDeprecated); |
| + // TODO(danrubel) : Perhaps should be protocol.ElementKind.ENUM_CONST |
| + // but element model represents them as FIELD |
| + expect(suggestion.element.kind, protocol.ElementKind.FIELD); |
|
Paul Berry
2015/05/29 17:55:57
Should this be protocol.ElementKind.ENUM_CONSTANT
danrubel
2015/06/01 04:26:56
Yes. See comment above code. Need to investigate w
Paul Berry
2015/06/01 12:45:59
Oops. Not sure how I missed the comment. Thanks!
danrubel
2015/06/04 21:48:14
https://codereview.chromium.org/1157283004/
|
| + return suggestion; |
| + } |
| + |
| CompletionSuggestion assertSuggestImportedClass(String name, |
| {CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION, |
| int relevance: DART_RELEVANCE_DEFAULT, String importUri}) { |