@@ -89,7 +89,7 @@ class FooSub extends Foo<int> {}
89
89
90
90
extension type One<E>(Foo<E> it) {
91
91
/// A named constructor.
92
- MyIterable .named(Foo<E> e);
92
+ One .named(Foo<E> e);
93
93
94
94
/// An instance method.
95
95
void m1() {}
@@ -147,6 +147,28 @@ dartdoc:
147
147
]);
148
148
});
149
149
150
+ test ('primary constructor page is rendered' , () async {
151
+ var constructorPageLines = resourceProvider
152
+ .readLines ([packagePath, 'doc' , 'lib' , 'One' , 'One.html' ]);
153
+ constructorPageLines.expectMainContentContainsAllInOrder ([
154
+ matches (
155
+ '<span class="kind-constructor">One<<wbr>'
156
+ '<span class="type-parameter">E</span>></span> constructor' ,
157
+ )
158
+ ]);
159
+ });
160
+
161
+ test ('named constructor page is rendered' , () async {
162
+ var constructorPageLines = resourceProvider
163
+ .readLines ([packagePath, 'doc' , 'lib' , 'One' , 'One.named.html' ]);
164
+ constructorPageLines.expectMainContentContainsAllInOrder ([
165
+ matches (
166
+ '<span class="kind-constructor">One<<wbr>'
167
+ '<span class="type-parameter">E</span>>.named</span> constructor' ,
168
+ )
169
+ ]);
170
+ });
171
+
150
172
test ('page contains representation type' , () async {
151
173
oneLines.expectMainContentContainsAllInOrder ([
152
174
matches ('<dt>on</dt>' ),
@@ -209,18 +231,13 @@ dartdoc:
209
231
]);
210
232
});
211
233
212
- test (
213
- 'page contains (static) constants' ,
214
- // TODO(srawlins): Implement.
215
- skip: true ,
216
- () async {
217
- oneLines.expectMainContentContainsAllInOrder ([
218
- matches ('<h2>Constants</h2>' ),
219
- matches ('<a href="../lib/One/c1-constant.html">c1</a>' ),
220
- matches ('A constant.' ),
221
- ]);
222
- },
223
- );
234
+ test ('page contains (static) constants' , () async {
235
+ oneLines.expectMainContentContainsAllInOrder ([
236
+ matches ('<h2>Constants</h2>' ),
237
+ matches ('<a href="../lib/One/c1-constant.html">c1</a>' ),
238
+ matches ('A constant.' ),
239
+ ]);
240
+ });
224
241
225
242
test ('page contains representation field' , () async {
226
243
oneLines.expectMainContentContainsAllInOrder ([
0 commit comments