Skip to content

Commit fd60e76

Browse files
committed
Test for #1779
1 parent 522d34c commit fd60e76

34 files changed

+568
-30
lines changed

test/model_test.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,12 @@ void main() {
12011201
expect(localMethod.documentationAsHtml, contains('<code>bar</code>'));
12021202
});
12031203

1204+
test('doc comment inherited from getter', () {
1205+
Field getterWithDocs = subForDocComments.instanceProperties
1206+
.firstWhere((m) => m.name == 'getterWithDocs');
1207+
expect(getterWithDocs.documentationAsHtml, contains('Some really great topics.'));
1208+
});
1209+
12041210
test(
12051211
'a property with no explicit getters and setters does not duplicate docs',
12061212
() {

testing/test_package/lib/fake.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,9 @@ class BaseForDocComments {
829829

830830
void anotherMethod() {}
831831

832+
/// Some really great topics.
833+
bool get getterWithDocs => true;
834+
832835
String operator [](String key) => "${key}'s value";
833836
}
834837

@@ -837,6 +840,9 @@ class BaseForDocComments {
837840
class SubForDocComments extends BaseForDocComments {
838841
/// Reference to [foo] and [bar]
839842
void localMethod(String foo, bar) {}
843+
844+
@override
845+
final bool getterWithDocs = false;
840846
}
841847

842848
typedef void VoidCallback();

testing/test_package_docs/fake/BaseForDocComments-class.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,18 @@ <h2>Constructors</h2>
202202
</dl>
203203
</section>
204204

205-
<section class="summary offset-anchor inherited" id="instance-properties">
205+
<section class="summary offset-anchor" id="instance-properties">
206206
<h2>Properties</h2>
207207

208208
<dl class="properties">
209+
<dt id="getterWithDocs" class="property">
210+
<span class="name"><a href="fake/BaseForDocComments/getterWithDocs.html">getterWithDocs</a></span>
211+
<span class="signature">&#8594; bool</span>
212+
</dt>
213+
<dd>
214+
Some really great topics.
215+
<div class="features">read-only</div>
216+
</dd>
209217
<dt id="hashCode" class="property inherited">
210218
<span class="name"><a href="fake/BaseForDocComments/hashCode.html">hashCode</a></span>
211219
<span class="signature">&#8594; int</span>
@@ -301,9 +309,10 @@ <h2>Operators</h2>
301309
<li class="section-title"><a href="fake/BaseForDocComments-class.html#constructors">Constructors</a></li>
302310
<li><a href="fake/BaseForDocComments/BaseForDocComments.html">BaseForDocComments</a></li>
303311

304-
<li class="section-title inherited">
312+
<li class="section-title">
305313
<a href="fake/BaseForDocComments-class.html#instance-properties">Properties</a>
306314
</li>
315+
<li><a href="fake/BaseForDocComments/getterWithDocs.html">getterWithDocs</a></li>
307316
<li class="inherited"><a href="fake/BaseForDocComments/hashCode.html">hashCode</a></li>
308317
<li class="inherited"><a href="fake/BaseForDocComments/runtimeType.html">runtimeType</a></li>
309318

testing/test_package_docs/fake/BaseForDocComments/BaseForDocComments.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ <h5>BaseForDocComments class</h5>
4242
<li class="section-title"><a href="fake/BaseForDocComments-class.html#constructors">Constructors</a></li>
4343
<li><a href="fake/BaseForDocComments/BaseForDocComments.html">BaseForDocComments</a></li>
4444

45-
<li class="section-title inherited">
45+
<li class="section-title">
4646
<a href="fake/BaseForDocComments-class.html#instance-properties">Properties</a>
4747
</li>
48+
<li><a href="fake/BaseForDocComments/getterWithDocs.html">getterWithDocs</a></li>
4849
<li class="inherited"><a href="fake/BaseForDocComments/hashCode.html">hashCode</a></li>
4950
<li class="inherited"><a href="fake/BaseForDocComments/runtimeType.html">runtimeType</a></li>
5051

testing/test_package_docs/fake/BaseForDocComments/anotherMethod.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ <h5>BaseForDocComments class</h5>
4242
<li class="section-title"><a href="fake/BaseForDocComments-class.html#constructors">Constructors</a></li>
4343
<li><a href="fake/BaseForDocComments/BaseForDocComments.html">BaseForDocComments</a></li>
4444

45-
<li class="section-title inherited">
45+
<li class="section-title">
4646
<a href="fake/BaseForDocComments-class.html#instance-properties">Properties</a>
4747
</li>
48+
<li><a href="fake/BaseForDocComments/getterWithDocs.html">getterWithDocs</a></li>
4849
<li class="inherited"><a href="fake/BaseForDocComments/hashCode.html">hashCode</a></li>
4950
<li class="inherited"><a href="fake/BaseForDocComments/runtimeType.html">runtimeType</a></li>
5051

testing/test_package_docs/fake/BaseForDocComments/doAwesomeStuff.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ <h5>BaseForDocComments class</h5>
4242
<li class="section-title"><a href="fake/BaseForDocComments-class.html#constructors">Constructors</a></li>
4343
<li><a href="fake/BaseForDocComments/BaseForDocComments.html">BaseForDocComments</a></li>
4444

45-
<li class="section-title inherited">
45+
<li class="section-title">
4646
<a href="fake/BaseForDocComments-class.html#instance-properties">Properties</a>
4747
</li>
48+
<li><a href="fake/BaseForDocComments/getterWithDocs.html">getterWithDocs</a></li>
4849
<li class="inherited"><a href="fake/BaseForDocComments/hashCode.html">hashCode</a></li>
4950
<li class="inherited"><a href="fake/BaseForDocComments/runtimeType.html">runtimeType</a></li>
5051

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<meta name="description" content="API docs for the getterWithDocs property from the BaseForDocComments class, for the Dart programming language.">
8+
<title>getterWithDocs property - BaseForDocComments class - fake library - Dart API</title>
9+
<!-- required because all the links are pseudo-absolute -->
10+
<base href="../..">
11+
12+
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500,400i,400,300|Source+Sans+Pro:400,300,700" rel="stylesheet">
13+
<link rel="stylesheet" href="static-assets/github.css">
14+
<link rel="stylesheet" href="static-assets/styles.css">
15+
<link rel="icon" href="static-assets/favicon.png">
16+
17+
</head>
18+
19+
<body>
20+
21+
<div id="overlay-under-drawer"></div>
22+
23+
<header id="title">
24+
<button id="sidenav-left-toggle" type="button">&nbsp;</button>
25+
<ol class="breadcrumbs gt-separated dark hidden-xs">
26+
<li><a href="index.html">test_package</a></li>
27+
<li><a href="fake/fake-library.html">fake</a></li>
28+
<li><a href="fake/BaseForDocComments-class.html">BaseForDocComments</a></li>
29+
<li class="self-crumb">getterWithDocs property</li>
30+
</ol>
31+
<div class="self-name">getterWithDocs</div>
32+
<form class="search navbar-right" role="search">
33+
<input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
34+
</form>
35+
</header>
36+
37+
<main>
38+
39+
<div class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left">
40+
<h5>BaseForDocComments class</h5>
41+
<ol>
42+
<li class="section-title"><a href="fake/BaseForDocComments-class.html#constructors">Constructors</a></li>
43+
<li><a href="fake/BaseForDocComments/BaseForDocComments.html">BaseForDocComments</a></li>
44+
45+
<li class="section-title">
46+
<a href="fake/BaseForDocComments-class.html#instance-properties">Properties</a>
47+
</li>
48+
<li><a href="fake/BaseForDocComments/getterWithDocs.html">getterWithDocs</a></li>
49+
<li class="inherited"><a href="fake/BaseForDocComments/hashCode.html">hashCode</a></li>
50+
<li class="inherited"><a href="fake/BaseForDocComments/runtimeType.html">runtimeType</a></li>
51+
52+
<li class="section-title"><a href="fake/BaseForDocComments-class.html#instance-methods">Methods</a></li>
53+
<li><a href="fake/BaseForDocComments/anotherMethod.html">anotherMethod</a></li>
54+
<li><a href="fake/BaseForDocComments/doAwesomeStuff.html">doAwesomeStuff</a></li>
55+
<li class="inherited"><a href="fake/BaseForDocComments/noSuchMethod.html">noSuchMethod</a></li>
56+
<li class="inherited"><a href="fake/BaseForDocComments/toString.html">toString</a></li>
57+
58+
<li class="section-title"><a href="fake/BaseForDocComments-class.html#operators">Operators</a></li>
59+
<li><a href="fake/BaseForDocComments/operator_get.html">operator []</a></li>
60+
<li class="inherited"><a href="fake/BaseForDocComments/operator_equals.html">operator ==</a></li>
61+
62+
63+
64+
</ol>
65+
</div><!--/.sidebar-offcanvas-->
66+
67+
<div class="col-xs-12 col-sm-9 col-md-8 main-content">
68+
<h1>getterWithDocs property</h1>
69+
70+
71+
<section id="getter">
72+
73+
<section class="multi-line-signature">
74+
<span class="returntype">bool</span>
75+
<span class="name ">getterWithDocs</span>
76+
77+
</section>
78+
79+
<section class="desc markdown">
80+
<p>Some really great topics.</p>
81+
</section>
82+
83+
</section>
84+
85+
</div> <!-- /.main-content -->
86+
87+
<div class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right">
88+
</div><!--/.sidebar-offcanvas-->
89+
90+
</main>
91+
92+
<footer>
93+
<span class="no-break">
94+
test_package 0.0.1
95+
</span>
96+
97+
</footer>
98+
99+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
100+
<script src="static-assets/typeahead.bundle.min.js"></script>
101+
<script src="static-assets/highlight.pack.js"></script>
102+
<script src="static-assets/URI.js"></script>
103+
<script src="static-assets/script.js"></script>
104+
105+
106+
</body>
107+
108+
</html>

testing/test_package_docs/fake/BaseForDocComments/hashCode.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ <h5>BaseForDocComments class</h5>
4242
<li class="section-title"><a href="fake/BaseForDocComments-class.html#constructors">Constructors</a></li>
4343
<li><a href="fake/BaseForDocComments/BaseForDocComments.html">BaseForDocComments</a></li>
4444

45-
<li class="section-title inherited">
45+
<li class="section-title">
4646
<a href="fake/BaseForDocComments-class.html#instance-properties">Properties</a>
4747
</li>
48+
<li><a href="fake/BaseForDocComments/getterWithDocs.html">getterWithDocs</a></li>
4849
<li class="inherited"><a href="fake/BaseForDocComments/hashCode.html">hashCode</a></li>
4950
<li class="inherited"><a href="fake/BaseForDocComments/runtimeType.html">runtimeType</a></li>
5051

testing/test_package_docs/fake/BaseForDocComments/noSuchMethod.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ <h5>BaseForDocComments class</h5>
4242
<li class="section-title"><a href="fake/BaseForDocComments-class.html#constructors">Constructors</a></li>
4343
<li><a href="fake/BaseForDocComments/BaseForDocComments.html">BaseForDocComments</a></li>
4444

45-
<li class="section-title inherited">
45+
<li class="section-title">
4646
<a href="fake/BaseForDocComments-class.html#instance-properties">Properties</a>
4747
</li>
48+
<li><a href="fake/BaseForDocComments/getterWithDocs.html">getterWithDocs</a></li>
4849
<li class="inherited"><a href="fake/BaseForDocComments/hashCode.html">hashCode</a></li>
4950
<li class="inherited"><a href="fake/BaseForDocComments/runtimeType.html">runtimeType</a></li>
5051

testing/test_package_docs/fake/BaseForDocComments/operator_equals.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ <h5>BaseForDocComments class</h5>
4242
<li class="section-title"><a href="fake/BaseForDocComments-class.html#constructors">Constructors</a></li>
4343
<li><a href="fake/BaseForDocComments/BaseForDocComments.html">BaseForDocComments</a></li>
4444

45-
<li class="section-title inherited">
45+
<li class="section-title">
4646
<a href="fake/BaseForDocComments-class.html#instance-properties">Properties</a>
4747
</li>
48+
<li><a href="fake/BaseForDocComments/getterWithDocs.html">getterWithDocs</a></li>
4849
<li class="inherited"><a href="fake/BaseForDocComments/hashCode.html">hashCode</a></li>
4950
<li class="inherited"><a href="fake/BaseForDocComments/runtimeType.html">runtimeType</a></li>
5051

testing/test_package_docs/fake/BaseForDocComments/operator_get.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ <h5>BaseForDocComments class</h5>
4242
<li class="section-title"><a href="fake/BaseForDocComments-class.html#constructors">Constructors</a></li>
4343
<li><a href="fake/BaseForDocComments/BaseForDocComments.html">BaseForDocComments</a></li>
4444

45-
<li class="section-title inherited">
45+
<li class="section-title">
4646
<a href="fake/BaseForDocComments-class.html#instance-properties">Properties</a>
4747
</li>
48+
<li><a href="fake/BaseForDocComments/getterWithDocs.html">getterWithDocs</a></li>
4849
<li class="inherited"><a href="fake/BaseForDocComments/hashCode.html">hashCode</a></li>
4950
<li class="inherited"><a href="fake/BaseForDocComments/runtimeType.html">runtimeType</a></li>
5051

testing/test_package_docs/fake/BaseForDocComments/runtimeType.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ <h5>BaseForDocComments class</h5>
4242
<li class="section-title"><a href="fake/BaseForDocComments-class.html#constructors">Constructors</a></li>
4343
<li><a href="fake/BaseForDocComments/BaseForDocComments.html">BaseForDocComments</a></li>
4444

45-
<li class="section-title inherited">
45+
<li class="section-title">
4646
<a href="fake/BaseForDocComments-class.html#instance-properties">Properties</a>
4747
</li>
48+
<li><a href="fake/BaseForDocComments/getterWithDocs.html">getterWithDocs</a></li>
4849
<li class="inherited"><a href="fake/BaseForDocComments/hashCode.html">hashCode</a></li>
4950
<li class="inherited"><a href="fake/BaseForDocComments/runtimeType.html">runtimeType</a></li>
5051

testing/test_package_docs/fake/BaseForDocComments/toString.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ <h5>BaseForDocComments class</h5>
4242
<li class="section-title"><a href="fake/BaseForDocComments-class.html#constructors">Constructors</a></li>
4343
<li><a href="fake/BaseForDocComments/BaseForDocComments.html">BaseForDocComments</a></li>
4444

45-
<li class="section-title inherited">
45+
<li class="section-title">
4646
<a href="fake/BaseForDocComments-class.html#instance-properties">Properties</a>
4747
</li>
48+
<li><a href="fake/BaseForDocComments/getterWithDocs.html">getterWithDocs</a></li>
4849
<li class="inherited"><a href="fake/BaseForDocComments/hashCode.html">hashCode</a></li>
4950
<li class="inherited"><a href="fake/BaseForDocComments/runtimeType.html">runtimeType</a></li>
5051

testing/test_package_docs/fake/SubForDocComments-class.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,18 @@ <h2>Constructors</h2>
202202
</dl>
203203
</section>
204204

205-
<section class="summary offset-anchor inherited" id="instance-properties">
205+
<section class="summary offset-anchor" id="instance-properties">
206206
<h2>Properties</h2>
207207

208208
<dl class="properties">
209+
<dt id="getterWithDocs" class="property">
210+
<span class="name"><a href="fake/SubForDocComments/getterWithDocs.html">getterWithDocs</a></span>
211+
<span class="signature">&#8594; bool</span>
212+
</dt>
213+
<dd>
214+
Some really great topics.
215+
<div class="features">final</div>
216+
</dd>
209217
<dt id="hashCode" class="property inherited">
210218
<span class="name"><a href="fake/BaseForDocComments/hashCode.html">hashCode</a></span>
211219
<span class="signature">&#8594; int</span>
@@ -310,9 +318,10 @@ <h2>Operators</h2>
310318
<li class="section-title"><a href="fake/SubForDocComments-class.html#constructors">Constructors</a></li>
311319
<li><a href="fake/SubForDocComments/SubForDocComments.html">SubForDocComments</a></li>
312320

313-
<li class="section-title inherited">
321+
<li class="section-title">
314322
<a href="fake/SubForDocComments-class.html#instance-properties">Properties</a>
315323
</li>
324+
<li><a href="fake/SubForDocComments/getterWithDocs.html">getterWithDocs</a></li>
316325
<li class="inherited"><a href="fake/BaseForDocComments/hashCode.html">hashCode</a></li>
317326
<li class="inherited"><a href="fake/BaseForDocComments/runtimeType.html">runtimeType</a></li>
318327

testing/test_package_docs/fake/SubForDocComments/SubForDocComments.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ <h5>SubForDocComments class</h5>
4242
<li class="section-title"><a href="fake/SubForDocComments-class.html#constructors">Constructors</a></li>
4343
<li><a href="fake/SubForDocComments/SubForDocComments.html">SubForDocComments</a></li>
4444

45-
<li class="section-title inherited">
45+
<li class="section-title">
4646
<a href="fake/SubForDocComments-class.html#instance-properties">Properties</a>
4747
</li>
48+
<li><a href="fake/SubForDocComments/getterWithDocs.html">getterWithDocs</a></li>
4849
<li class="inherited"><a href="fake/BaseForDocComments/hashCode.html">hashCode</a></li>
4950
<li class="inherited"><a href="fake/BaseForDocComments/runtimeType.html">runtimeType</a></li>
5051

0 commit comments

Comments
 (0)