Allow completion tests to include suggestions of private identifiers

Change-Id: I4b735b75d0ab67598624bab3d340ef2e6ca25f37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286868
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Brian Wilkerson 2023-03-04 05:45:19 +00:00 committed by Commit Queue
parent 25554cb6e6
commit 262acf7c90

View file

@ -209,7 +209,7 @@ name: test
if (kind == CompletionSuggestionKind.IDENTIFIER ||
kind == CompletionSuggestionKind.INVOCATION) {
var completion = suggestion.completion;
return RegExp(r'^[a-zA-Z][0-9]+$').hasMatch(completion) ||
return RegExp(r'^_?[a-zA-Z][0-9]+$').hasMatch(completion) ||
allowedIdentifiers.contains(completion);
} else if (kind == CompletionSuggestionKind.KEYWORD) {
return includeKeywords;