| Index: pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart
|
| diff --git a/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart b/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart
|
| index 226e9ac9c4f501a1e8c335519a3d08a5422e1e6d..7794c29552bd599b9bcf7fa1dd184fea40b4f887 100644
|
| --- a/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart
|
| +++ b/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart
|
| @@ -61,6 +61,21 @@ abstract class DartCompletionContributorTest extends AbstractContextTest {
|
| expect(suggestion.hasNamedParameters, isNotNull);
|
| }
|
|
|
| + void assertNoSuggestions({CompletionSuggestionKind kind: null}) {
|
| + if (kind == null) {
|
| + if (suggestions.length > 0) {
|
| + failedCompletion('Expected no suggestions', suggestions);
|
| + }
|
| + return;
|
| + }
|
| + CompletionSuggestion suggestion = suggestions.firstWhere(
|
| + (CompletionSuggestion cs) => cs.kind == kind,
|
| + orElse: () => null);
|
| + if (suggestion != null) {
|
| + failedCompletion('did not expect completion: $completion\n $suggestion');
|
| + }
|
| + }
|
| +
|
| void assertNotSuggested(String completion) {
|
| CompletionSuggestion suggestion = suggestions.firstWhere(
|
| (CompletionSuggestion cs) => cs.completion == completion,
|
|
|