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

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

Issue 1380223003: Issue 23694. Include 'docSummary' and 'docComplete' into CompletionSuggestion. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: tweak Created 5 years, 2 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
Index: pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart
diff --git a/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart
index 36525d2b3d11cab817f591c8a829e77c6b051e53..a50ff5f0dd350a32948437edb520484c4b19c866 100644
--- a/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart
@@ -337,6 +337,46 @@ class ImportedReferenceContributorTest extends AbstractSelectorSuggestionTest {
});
}
+ test_doc_class() {
+ addSource(
+ '/libA.dart',
+ r'''
+library A;
+/// My class.
+/// Short description.
+///
+/// Longer description.
+class A {}
+''');
+ addTestSource('import "/libA.dart"; main() {^}');
+ return computeFull((bool result) {
+ assertSuggestClass('A',
+ docSummaryMatcher: 'My class.\nShort description.',
+ docCompleteMatcher:
+ 'My class.\nShort description.\n\nLonger description.');
+ });
+ }
+
+ test_doc_function() {
+ addSource(
+ '/libA.dart',
+ r'''
+library A;
+/// My function.
+/// Short description.
+///
+/// Longer description.
+int myFunc() {}
+''');
+ addTestSource('import "/libA.dart"; main() {^}');
+ return computeFull((bool result) {
+ assertSuggestFunction('myFunc', 'int',
+ docSummaryMatcher: 'My function.\nShort description.',
+ docCompleteMatcher:
+ 'My function.\nShort description.\n\nLonger description.');
+ });
+ }
+
test_enum() {
addSource('/libA.dart', 'library A; enum E { one, two }');
addTestSource('import "/libA.dart"; main() {^}');

Powered by Google App Engine
This is Rietveld 408576698