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

Unified Diff: pkg/analysis_server/test/domain_completion_test.dart

Issue 1530393004: suggest IDENTIFIER not INVOCATION for dartdoc refs (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rebase Created 5 years 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
Index: pkg/analysis_server/test/domain_completion_test.dart
diff --git a/pkg/analysis_server/test/domain_completion_test.dart b/pkg/analysis_server/test/domain_completion_test.dart
index 09736bfec52757f27a375eb82b144080577f69cf..ae8786ec835f308fd69fa3b63722394df65f0152 100644
--- a/pkg/analysis_server/test/domain_completion_test.dart
+++ b/pkg/analysis_server/test/domain_completion_test.dart
@@ -583,24 +583,34 @@ class CompletionTest extends AbstractAnalysisTest {
expect(suggestions, isEmpty);
}
- test_inDartDoc_reference2() async {
+ test_inDartDoc_reference1() async {
+ addFile(
+ '/testA.dart',
+ '''
+ part of libA;
+ foo(bar) => 0;''');
addTestFile('''
+ library libA;
+ part "/testA.dart";
+ import "dart:math";
/// The [^]
main(aaa, bbb) {}
''');
await getSuggestions();
- assertHasResult(CompletionSuggestionKind.INVOCATION, 'main',
+ assertHasResult(CompletionSuggestionKind.IDENTIFIER, 'main',
+ relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+ assertHasResult(CompletionSuggestionKind.IDENTIFIER, 'foo',
relevance: DART_RELEVANCE_LOCAL_FUNCTION);
- assertHasResult(CompletionSuggestionKind.INVOCATION, 'Object');
+ assertHasResult(CompletionSuggestionKind.IDENTIFIER, 'min');
}
- test_inDartDoc_reference3() async {
+ test_inDartDoc_reference2() async {
addTestFile('''
/// The [m^]
main(aaa, bbb) {}
''');
await getSuggestions();
- assertHasResult(CompletionSuggestionKind.INVOCATION, 'main',
+ assertHasResult(CompletionSuggestionKind.IDENTIFIER, 'main',
relevance: DART_RELEVANCE_LOCAL_FUNCTION);
}

Powered by Google App Engine
This is Rietveld 408576698