@@ -211,6 +211,40 @@ final foo = {"key": ?Foo()};
211
211
expect (target.length, 3 );
212
212
}
213
213
214
+ Future <void > test_documentation () async {
215
+ addTestFile ('''
216
+ /// [math]
217
+ import 'dart:math' as math;
218
+ ''' );
219
+ await waitForTasksFinished ();
220
+ await _getNavigation (search: 'math]' );
221
+ expect (regions, hasLength (1 ));
222
+ assertHasRegionString ('math' );
223
+ expect (testTargets, hasLength (1 ));
224
+ var target = targets[regions.first.targets.first];
225
+ expect (target.kind, ElementKind .PREFIX );
226
+ expect (target.offset, findOffset ('math;' ));
227
+ expect (target.length, 4 );
228
+ }
229
+
230
+ Future <void > test_documentation_library () async {
231
+ addTestFile ('''
232
+ /// [math]
233
+ library;
234
+
235
+ import 'dart:math' as math;
236
+ ''' );
237
+ await waitForTasksFinished ();
238
+ await _getNavigation (search: 'math]' );
239
+ expect (regions, hasLength (1 ));
240
+ assertHasRegionString ('math' );
241
+ expect (testTargets, hasLength (1 ));
242
+ var target = targets[regions.first.targets.first];
243
+ expect (target.kind, ElementKind .PREFIX );
244
+ expect (target.offset, findOffset ('math;' ));
245
+ expect (target.length, 4 );
246
+ }
247
+
214
248
Future <void > test_field_underscore () async {
215
249
addTestFile ('''
216
250
class C {
0 commit comments