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

Unified Diff: pkg/analysis_server/test/analysis/get_hover_test.dart

Issue 1384583007: Fix hover documentation for parameters. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
« no previous file with comments | « pkg/analysis_server/lib/src/computer/computer_hover.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/analysis/get_hover_test.dart
diff --git a/pkg/analysis_server/test/analysis/get_hover_test.dart b/pkg/analysis_server/test/analysis/get_hover_test.dart
index bda7c915f1b7f008975039b05d5c5fa9307ebc01..61520dc76f2a531537bcd2ba852c6846096c9177 100644
--- a/pkg/analysis_server/test/analysis/get_hover_test.dart
+++ b/pkg/analysis_server/test/analysis/get_hover_test.dart
@@ -168,6 +168,31 @@ main(A a) {
});
}
+ test_expression_parameter() {
+ addTestFile('''
+library my.library;
+class A {
+ /// The method documentation.
+ m(int p) {
+ }
+}
+''');
+ return prepareHover('p) {').then((HoverInformation hover) {
+ // element
+ expect(hover.containingLibraryName, isNull);
+ expect(hover.containingLibraryPath, isNull);
+ expect(hover.containingClassDescription, isNull);
+ expect(hover.dartdoc, 'The method documentation.');
+ expect(hover.elementDescription, 'int p');
+ expect(hover.elementKind, 'parameter');
+ // types
+ expect(hover.staticType, 'int');
+ expect(hover.propagatedType, isNull);
+ // no parameter
+ expect(hover.parameter, isNull);
+ });
+ }
+
test_expression_syntheticGetter() {
addTestFile('''
library my.library;
« no previous file with comments | « pkg/analysis_server/lib/src/computer/computer_hover.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698