@@ -48,11 +48,11 @@ int value = 0;
4848 var annotation = valueVariable.annotations.single;
4949 expect (
5050 annotation.linkedName,
51- '<a href="$dartCoreUrlPrefix /Deprecated-class .html">Deprecated</a>' ,
51+ '<a href="$dartCoreUrlPrefix /Deprecated/Deprecated .html">Deprecated</a>' ,
5252 );
5353 expect (
5454 annotation.linkedNameWithParameters,
55- '@<a href="$dartCoreUrlPrefix /Deprecated-class .html">Deprecated</a>'
55+ '@<a href="$dartCoreUrlPrefix /Deprecated/Deprecated .html">Deprecated</a>'
5656 '('text')' ,
5757 );
5858 }
@@ -97,16 +97,40 @@ int value = 0;
9797 var annotation = valueVariable.annotations.single;
9898 expect (
9999 annotation.linkedName,
100- '<a href="${htmlBasePlaceholder }annotations/MyAnnotation-class .html">'
100+ '<a href="${htmlBasePlaceholder }annotations/MyAnnotation/MyAnnotation .html">'
101101 'MyAnnotation</a>' ,
102102 );
103103 expect (
104104 annotation.linkedNameWithParameters,
105- '@<a href="${htmlBasePlaceholder }annotations/MyAnnotation-class .html">'
105+ '@<a href="${htmlBasePlaceholder }annotations/MyAnnotation/MyAnnotation .html">'
106106 'MyAnnotation</a>(true)' ,
107107 );
108108 }
109109
110+ void test_locallyDeclaredConstructorCall_named () async {
111+ var library = await bootPackageWithLibrary ('''
112+ class MyAnnotation {
113+ const MyAnnotation.named(bool b);
114+ }
115+
116+ @MyAnnotation.named(true)
117+ int value = 0;
118+ ''' );
119+ var valueVariable = library.properties.named ('value' );
120+ expect (valueVariable.hasAnnotations, true );
121+ var annotation = valueVariable.annotations.single;
122+ expect (
123+ annotation.linkedName,
124+ '<a href="${htmlBasePlaceholder }annotations/MyAnnotation/MyAnnotation.named.html">'
125+ 'MyAnnotation.named</a>' ,
126+ );
127+ expect (
128+ annotation.linkedNameWithParameters,
129+ '@<a href="${htmlBasePlaceholder }annotations/MyAnnotation/MyAnnotation.named.html">'
130+ 'MyAnnotation.named</a>(true)' ,
131+ );
132+ }
133+
110134 void test_genericConstructorCall () async {
111135 var library = await bootPackageWithLibrary ('''
112136class Ann<T> {
@@ -122,15 +146,13 @@ int value = 0;
122146 var annotation = valueVariable.annotations.single;
123147 expect (
124148 annotation.linkedName,
125- '<a href="${htmlBasePlaceholder }annotations/Ann-class.html">Ann</a>'
126- '<span class="signature"><<wbr><span class="type-parameter">'
127- '<a href="$dartCoreUrlPrefix /bool-class.html">bool</a></span>></span>' ,
149+ '<a href="${htmlBasePlaceholder }annotations/Ann/Ann.html">Ann</a>' ,
128150 );
129151 expect (
130152 annotation.linkedNameWithParameters,
131- '@<a href="${htmlBasePlaceholder }annotations/Ann-class .html">Ann</a>'
132- '<span class="signature"> <<wbr><span class="type-parameter"> '
133- '<a href="$ dartCoreUrlPrefix /bool-class.html">bool</a></span>></span> (true)' ,
153+ '@<a href="${htmlBasePlaceholder }annotations/Ann/Ann .html">Ann</a>'
154+ '<<a href="$ dartCoreUrlPrefix /bool-class.html">bool</a>> '
155+ '(true)' ,
134156 );
135157 }
136158}
0 commit comments