Chromium Code Reviews| Index: pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart |
| diff --git a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart |
| index 231ce1d56ddb257ce15053df93a06ab7d83f0905..230fbda9ac1e10949b197aabfc63e2a33588c569 100644 |
| --- a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart |
| +++ b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart |
| @@ -45,6 +45,48 @@ class ImportedReferenceContributorTest extends DartCompletionContributorTest { |
| assertNotSuggested('two'); |
| } |
| + test_doc_class() async { |
| + addSource( |
| + '/libA.dart', |
| + r''' |
| +library A; |
| +/// My class. |
| +/// Short description. |
| +/// |
| +/// Longer description. |
| +class A {} |
| +'''); |
| + addTestSource('import "/libA.dart"; main() {^}'); |
| + |
| + await computeSuggestions(); |
| + |
| + CompletionSuggestion suggestion = assertSuggestClass('A'); |
| + expect(suggestion.docSummary, 'My class.\nShort description.'); |
| + expect(suggestion.docComplete, |
| + 'My class.\nShort description.\n\nLonger description.'); |
| + } |
| + |
| + test_doc_function() async { |
|
Brian Wilkerson
2015/12/17 22:51:17
We should add a test with c-style comments (or con
pquitslund
2015/12/18 04:56:49
Good call. Done.
|
| + resolveSource( |
| + '/libA.dart', |
| + r''' |
| +library A; |
| +/// My function. |
| +/// Short description. |
| +/// |
| +/// Longer description. |
| +int myFunc() {} |
| +'''); |
| + addTestSource('import "/libA.dart"; main() {^}'); |
| + |
| + await computeSuggestions(); |
| + |
| + CompletionSuggestion suggestion = assertSuggestFunction('myFunc', 'int'); |
| + expect(suggestion.docSummary, 'My function.\nShort description.'); |
| + expect(suggestion.docComplete, |
| + 'My function.\nShort description.\n\nLonger description.'); |
| + } |
| + |
| test_enum() async { |
| addSource('/libA.dart', 'library A; enum E { one, two }'); |
| addTestSource('import "/libA.dart"; main() {^}'); |