@@ -2266,7 +2266,7 @@ void main() {
2266
2266
ParameterRendererHtml ()
2267
2267
.renderLinkedParams (paramOfFutureOrNull.parameters),
2268
2268
equals (
2269
- '<span class="parameter" id="paramOfFutureOrNull-param-future"><span class="type-annotation">FutureOr<span class="signature"><<wbr><span class="type-parameter">Null</span>></span></span> <span class="parameter-name">future</span></span><wbr> ' ));
2269
+ '<span class="parameter" id="paramOfFutureOrNull-param-future"><span class="type-annotation">FutureOr<span class="signature"><<wbr><span class="type-parameter">Null</span>></span></span> <span class="parameter-name">future</span></span>' ));
2270
2270
});
2271
2271
2272
2272
test ('function with a bound type to FutureOr' , () {
@@ -2309,7 +2309,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
2309
2309
params,
2310
2310
'<span class="parameter" id="addCallback-param-callback">'
2311
2311
'<span class="type-annotation"><a href="${HTMLBASE_PLACEHOLDER }fake/VoidCallback.html">VoidCallback</a></span> '
2312
- '<span class="parameter-name">callback</span></span><wbr> ' );
2312
+ '<span class="parameter-name">callback</span></span>' );
2313
2313
2314
2314
function =
2315
2315
fakeLibrary.functions.firstWhere ((f) => f.name == 'addCallback2' );
@@ -2318,7 +2318,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
2318
2318
params,
2319
2319
'<span class="parameter" id="addCallback2-param-callback">'
2320
2320
'<span class="type-annotation"><a href="${HTMLBASE_PLACEHOLDER }fake/Callback2.html">Callback2</a></span> '
2321
- '<span class="parameter-name">callback</span></span><wbr> ' );
2321
+ '<span class="parameter-name">callback</span></span>' );
2322
2322
});
2323
2323
2324
2324
test ('supports generic methods' , () {
@@ -2329,8 +2329,13 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
2329
2329
test ('can resolve functions as parameters' , () {
2330
2330
var params = ParameterRendererHtml ()
2331
2331
.renderLinkedParams (doAComplicatedThing.parameters);
2332
- expect (params,
2333
- '<span class="parameter" id="doAComplicatedThing-param-x"><span class="type-annotation">int</span> <span class="parameter-name">x</span>, </span><wbr><span class="parameter" id="doAComplicatedThing-param-doSomething">{<span class="type-annotation">void</span> <span class="parameter-name">doSomething</span>(<span class="parameter" id="param-aThingParameter"><span class="type-annotation">int</span> <span class="parameter-name">aThingParameter</span>, </span><wbr><span class="parameter" id="param-anotherThing"><span class="type-annotation">String</span> <span class="parameter-name">anotherThing</span></span><wbr>), </span><wbr><span class="parameter" id="doAComplicatedThing-param-doSomethingElse"><span class="type-annotation">void</span> <span class="parameter-name">doSomethingElse</span>(<span class="parameter" id="param-aThingParameter"><span class="type-annotation">int</span> <span class="parameter-name">aThingParameter</span>, </span><wbr><span class="parameter" id="param-somethingElse"><span class="type-annotation">double</span> <span class="parameter-name">somethingElse</span></span><wbr>)}</span><wbr>');
2332
+ expect (
2333
+ params,
2334
+ '<span class="parameter" id="doAComplicatedThing-param-x"><span class="type-annotation">int</span> <span class="parameter-name">x</span>, </span>'
2335
+ '<span class="parameter" id="doAComplicatedThing-param-doSomething">{<span class="type-annotation">void</span> <span class="parameter-name">doSomething</span>(<span class="parameter" id="param-aThingParameter"><span class="type-annotation">int</span> <span class="parameter-name">aThingParameter</span>, </span>'
2336
+ '<span class="parameter" id="param-anotherThing"><span class="type-annotation">String</span> <span class="parameter-name">anotherThing</span></span>), </span>'
2337
+ '<span class="parameter" id="doAComplicatedThing-param-doSomethingElse"><span class="type-annotation">void</span> <span class="parameter-name">doSomethingElse</span>(<span class="parameter" id="param-aThingParameter"><span class="type-annotation">int</span> <span class="parameter-name">aThingParameter</span>, </span>'
2338
+ '<span class="parameter" id="param-somethingElse"><span class="type-annotation">double</span> <span class="parameter-name">somethingElse</span></span>)}</span>' );
2334
2339
});
2335
2340
});
2336
2341
@@ -2349,8 +2354,11 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
2349
2354
.singleWhere ((f) => f.name == 'explicitSetter' );
2350
2355
// TODO(jcollins-g): really, these shouldn't be called "parameters" in
2351
2356
// the span class.
2352
- expect (explicitSetter.linkedReturnType,
2353
- '<span class="parameter" id="explicitSetter=-param-f"><span class="type-annotation">dynamic</span> <span class="parameter-name">Function</span>(<span class="parameter" id="param-bar"><span class="type-annotation">int</span>, </span><wbr><span class="parameter" id="param-baz"><span class="type-annotation"><a href="${HTMLBASE_PLACEHOLDER }fake/Cool-class.html">Cool</a></span>, </span><wbr><span class="parameter" id="param-macTruck"><span class="type-annotation">List<span class="signature"><<wbr><span class="type-parameter">int</span>></span></span></span><wbr>)</span><wbr>' );
2357
+ expect (
2358
+ explicitSetter.linkedReturnType,
2359
+ '<span class="parameter" id="explicitSetter=-param-f"><span class="type-annotation">dynamic</span> <span class="parameter-name">Function</span>(<span class="parameter" id="param-bar"><span class="type-annotation">int</span>, </span>'
2360
+ '<span class="parameter" id="param-baz"><span class="type-annotation"><a href="${HTMLBASE_PLACEHOLDER }fake/Cool-class.html">Cool</a></span>, </span>'
2361
+ '<span class="parameter" id="param-macTruck"><span class="type-annotation">List<span class="signature"><<wbr><span class="type-parameter">int</span>></span></span></span>)</span>' );
2354
2362
});
2355
2363
2356
2364
test ('parameterized type from field is correctly displayed' , () {
@@ -2398,7 +2406,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
2398
2406
// TODO(jcollins-g): really, these shouldn't be called "parameters" in
2399
2407
// the span class.
2400
2408
expect (aInheritedSetter.enclosingCombo.linkedReturnType,
2401
- '<span class="parameter" id="aInheritedSetter=-param-thingToSet"><span class="type-annotation"><a href="${HTMLBASE_PLACEHOLDER }ex/AnotherParameterizedClass-class.html">AnotherParameterizedClass</a><span class="signature"><<wbr><span class="type-parameter">List<span class="signature"><<wbr><span class="type-parameter">int</span>></span></span>></span></span></span><wbr> ' );
2409
+ '<span class="parameter" id="aInheritedSetter=-param-thingToSet"><span class="type-annotation"><a href="${HTMLBASE_PLACEHOLDER }ex/AnotherParameterizedClass-class.html">AnotherParameterizedClass</a><span class="signature"><<wbr><span class="type-parameter">List<span class="signature"><<wbr><span class="type-parameter">int</span>></span></span>></span></span></span>' );
2402
2410
});
2403
2411
2404
2412
test (
@@ -2446,7 +2454,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
2446
2454
expect (
2447
2455
ParameterRendererHtml ()
2448
2456
.renderLinkedParams (aInheritedAdditionOperator.parameters),
2449
- '<span class="parameter" id="+-param-other"><span class="type-annotation"><a href="${HTMLBASE_PLACEHOLDER }ex/ParameterizedClass-class.html">ParameterizedClass</a><span class="signature"><<wbr><span class="type-parameter">List<span class="signature"><<wbr><span class="type-parameter">int</span>></span></span>></span></span> <span class="parameter-name">other</span></span><wbr> ' );
2457
+ '<span class="parameter" id="+-param-other"><span class="type-annotation"><a href="${HTMLBASE_PLACEHOLDER }ex/ParameterizedClass-class.html">ParameterizedClass</a><span class="signature"><<wbr><span class="type-parameter">List<span class="signature"><<wbr><span class="type-parameter">int</span>></span></span>></span></span> <span class="parameter-name">other</span></span>' );
2450
2458
});
2451
2459
2452
2460
test ('' , () {});
@@ -2509,7 +2517,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
2509
2517
expect (
2510
2518
getAFunctionReturningVoid.linkedReturnType,
2511
2519
equals (
2512
- 'void Function<span class="signature">(<span class="parameter" id="param-"><span class="type-annotation">T1</span>, </span><wbr>< span class="parameter" id="param-"><span class="type-annotation">T2</span></span><wbr >)</span>' ));
2520
+ 'void Function<span class="signature">(<span class="parameter" id="param-"><span class="type-annotation">T1</span>, </span><span class="parameter" id="param-"><span class="type-annotation">T2</span></span>)</span>' ));
2513
2521
});
2514
2522
2515
2523
test (
@@ -2518,7 +2526,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
2518
2526
expect (
2519
2527
getAFunctionReturningBool.linkedReturnType,
2520
2528
equals (
2521
- 'bool Function<<wbr><span class="type-parameter">T4</span>><span class="signature">(<span class="parameter" id="param-"><span class="type-annotation">String</span>, </span><wbr>< span class="parameter" id="param-"><span class="type-annotation">T1</span>, </span><wbr>< span class="parameter" id="param-"><span class="type-annotation">T4</span></span><wbr >)</span>' ));
2529
+ 'bool Function<<wbr><span class="type-parameter">T4</span>><span class="signature">(<span class="parameter" id="param-"><span class="type-annotation">String</span>, </span><span class="parameter" id="param-"><span class="type-annotation">T1</span>, </span><span class="parameter" id="param-"><span class="type-annotation">T4</span></span>)</span>' ));
2522
2530
});
2523
2531
2524
2532
test ('has a fully qualified name' , () {
@@ -3125,11 +3133,11 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
3125
3133
// TODO(jcollins-g): after analyzer 0.39.5 change to 'num' in first
3126
3134
// group.
3127
3135
matches (RegExp (
3128
- r'(dynamic|num) Function<span class="signature">\(<span class="parameter" id="param-a"><span class="type-annotation">List<span class="signature"><<wbr><span class="type-parameter">num</span>></span></span> <span class="parameter-name">a</span></span><wbr> \)</span>' )));
3136
+ r'(dynamic|num) Function<span class="signature">\(<span class="parameter" id="param-a"><span class="type-annotation">List<span class="signature"><<wbr><span class="type-parameter">num</span>></span></span> <span class="parameter-name">a</span></span>\)</span>' )));
3129
3137
expect (
3130
3138
importantComputations.linkedReturnType,
3131
3139
matches (RegExp (
3132
- r'Map<span class="signature"><<wbr><span class="type-parameter">int</span>, <span class="type-parameter">(dynamic|num) Function<span class="signature">\(<span class="parameter" id="param-a"><span class="type-annotation">List<span class="signature"><<wbr><span class="type-parameter">num</span>></span></span> <span class="parameter-name">a</span></span><wbr> \)</span></span>></span>' )));
3140
+ r'Map<span class="signature"><<wbr><span class="type-parameter">int</span>, <span class="type-parameter">(dynamic|num) Function<span class="signature">\(<span class="parameter" id="param-a"><span class="type-annotation">List<span class="signature"><<wbr><span class="type-parameter">num</span>></span></span> <span class="parameter-name">a</span></span>\)</span></span>></span>' )));
3133
3141
});
3134
3142
3135
3143
test (
@@ -3138,7 +3146,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
3138
3146
expect (
3139
3147
complicatedReturn.linkedReturnType,
3140
3148
equals (
3141
- '<a href="${HTMLBASE_PLACEHOLDER }fake/ATypeTakingClass-class.html">ATypeTakingClass</a><span class="signature"><<wbr><span class="type-parameter">String Function<span class="signature">(<span class="parameter" id="param-"><span class="type-annotation">int</span></span><wbr> )</span></span>></span>' ));
3149
+ '<a href="${HTMLBASE_PLACEHOLDER }fake/ATypeTakingClass-class.html">ATypeTakingClass</a><span class="signature"><<wbr><span class="type-parameter">String Function<span class="signature">(<span class="parameter" id="param-"><span class="type-annotation">int</span></span>)</span></span>></span>' ));
3142
3150
});
3143
3151
3144
3152
test ('@nodoc on simple property works' , () {
@@ -3423,7 +3431,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
3423
3431
ParameterRendererHtml ().renderLinkedParams (aVoidParameter.parameters,
3424
3432
showMetadata: true , showNames: true ),
3425
3433
equals (
3426
- '<span class="parameter" id="aVoidParameter-param-p1"><span class="type-annotation">Future<span class="signature"><<wbr><span class="type-parameter">void</span>></span></span> <span class="parameter-name">p1</span></span><wbr> ' ));
3434
+ '<span class="parameter" id="aVoidParameter-param-p1"><span class="type-annotation">Future<span class="signature"><<wbr><span class="type-parameter">void</span>></span></span> <span class="parameter-name">p1</span></span>' ));
3427
3435
});
3428
3436
3429
3437
test ('a class that extends Future<void>' , () {
@@ -3505,7 +3513,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
3505
3513
expect (
3506
3514
ParameterRendererHtml ().renderLinkedParams (theConstructor.parameters),
3507
3515
equals (
3508
- '<span class="parameter" id="-param-x"><span class="type-annotation"><a href="${HTMLBASE_PLACEHOLDER }ex/ParameterizedTypedef.html">ParameterizedTypedef</a><span class="signature"><<wbr><span class="type-parameter">double</span>></span></span> <span class="parameter-name">x</span></span><wbr> ' ));
3516
+ '<span class="parameter" id="-param-x"><span class="type-annotation"><a href="${HTMLBASE_PLACEHOLDER }ex/ParameterizedTypedef.html">ParameterizedTypedef</a><span class="signature"><<wbr><span class="type-parameter">double</span>></span></span> <span class="parameter-name">x</span></span>' ));
3509
3517
});
3510
3518
3511
3519
test ('anonymous nested functions inside typedefs are handled' , () {
@@ -3522,7 +3530,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
3522
3530
expect (
3523
3531
aComplexTypedef.linkedReturnType,
3524
3532
equals (
3525
- 'void Function<span class="signature">(<span class="parameter" id="param-"><span class="type-annotation">A1</span>, </span><wbr>< span class="parameter" id="param-"><span class="type-annotation">A2</span>, </span><wbr>< span class="parameter" id="param-"><span class="type-annotation">A3</span></span><wbr >)</span>' ));
3533
+ 'void Function<span class="signature">(<span class="parameter" id="param-"><span class="type-annotation">A1</span>, </span><span class="parameter" id="param-"><span class="type-annotation">A2</span>, </span><span class="parameter" id="param-"><span class="type-annotation">A3</span></span>)</span>' ));
3526
3534
expect (
3527
3535
aComplexTypedef.linkedParamsLines,
3528
3536
equals (
@@ -3690,7 +3698,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
3690
3698
params,
3691
3699
equals ('<span class="parameter" id="methodWithTypedefParam-param-p">'
3692
3700
'<span class="type-annotation"><a href="${HTMLBASE_PLACEHOLDER }ex/processMessage.html">processMessage</a></span> '
3693
- '<span class="parameter-name">p</span></span><wbr> ' ));
3701
+ '<span class="parameter-name">p</span></span>' ));
3694
3702
});
3695
3703
});
3696
3704
0 commit comments