@@ -22,34 +22,33 @@ class RecordTest extends DartdocTestBase {
22
22
String get libraryName => 'records' ;
23
23
24
24
@override
25
- String get sdkConstraint => '>=2.19.0-0 <3 .0.0' ;
25
+ String get sdkConstraint => '>=2.19.0-0 <4 .0.0' ;
26
26
27
27
@override
28
28
List <String > get experiments => ['records' ];
29
29
30
30
void test_noFields () async {
31
31
var library = await bootPackageWithLibrary ('''
32
- void f(() record ) {}
32
+ void f(() r ) {}
33
33
''' );
34
34
var fFunction = library.functions.named ('f' );
35
35
var recordType = fFunction.modelType.parameters.first.modelType;
36
- expect (recordType.linkedName, equals ('Record ()' ));
36
+ expect (recordType.linkedName, equals ('()' ));
37
37
expect (recordType.nameWithGenerics, equals ('Record' ));
38
38
}
39
39
40
40
void test_onePositionalField () async {
41
41
var library = await bootPackageWithLibrary ('''
42
- void f((int) record ) {}
42
+ void f((int) r ) {}
43
43
''' );
44
44
var fFunction = library.functions.named ('f' );
45
45
var recordType = fFunction.modelType.parameters.first.modelType;
46
46
expect (recordType.linkedName, matchesCompressed (r'''
47
- Record \(
47
+ \(
48
48
<span class="field">
49
49
<span class="type-annotation">
50
50
<a href=".*/dart-core/int-class.html">int</a>
51
51
</span>
52
- <span class="field-name">\$0</span>
53
52
</span>
54
53
\)
55
54
''' ));
@@ -58,23 +57,21 @@ void f((int) record) {}
58
57
59
58
void test_positionalFields () async {
60
59
var library = await bootPackageWithLibrary ('''
61
- void f((int, String) record ) {}
60
+ void f((int, String) r ) {}
62
61
''' );
63
62
var fFunction = library.functions.named ('f' );
64
63
var recordType = fFunction.modelType.parameters.first.modelType;
65
64
expect (recordType.linkedName, matchesCompressed (r'''
66
- Record \(
65
+ \(
67
66
<span class="field">
68
67
<span class="type-annotation">
69
68
<a href=".*/dart-core/int-class.html">int</a>
70
- </span>
71
- <span class="field-name">\$0</span>,
69
+ </span>,
72
70
</span>
73
71
<span class="field">
74
72
<span class="type-annotation">
75
73
<a href=".*/dart-core/String-class.html">String</a>
76
74
</span>
77
- <span class="field-name">\$1</span>
78
75
</span>
79
76
\)
80
77
''' ));
@@ -88,7 +85,7 @@ void f(({int bbb, String aaa}) record) {}
88
85
var fFunction = library.functions.named ('f' );
89
86
var recordType = fFunction.modelType.parameters.first.modelType;
90
87
expect (recordType.linkedName, matchesCompressed (r'''
91
- Record \(
88
+ \(
92
89
<span class="field">
93
90
\{
94
91
<span class="type-annotation">
@@ -115,18 +112,16 @@ void f((int one, String two, {int ccc, String aaa, int bbb}) record) {}
115
112
var fFunction = library.functions.named ('f' );
116
113
var recordType = fFunction.modelType.parameters.first.modelType;
117
114
expect (recordType.linkedName, matchesCompressed (r'''
118
- Record \(
115
+ \(
119
116
<span class="field">
120
117
<span class="type-annotation">
121
118
<a href=".*/dart-core/int-class.html">int</a>
122
- </span>
123
- <span class="field-name">\$0</span>,
119
+ </span>,
124
120
</span>
125
121
<span class="field">
126
122
<span class="type-annotation">
127
123
<a href=".*/dart-core/String-class.html">String</a>
128
- </span>
129
- <span class="field-name">\$1</span>,
124
+ </span>,
130
125
</span>
131
126
<span class="field">
132
127
\{
0 commit comments