@@ -21,6 +21,7 @@ extension Main.ParseCodelink:TestBattery
21
21
tests. expect ( link. base ==? . relative)
22
22
tests. expect ( link. path. components ..? [ " Unicode " , " Scalar " , " value " ] )
23
23
tests. expect ( link. path. visible ..? [ " Unicode " , " Scalar " , " value " ] )
24
+ tests. expect ( false : link. path. hasTrailingParentheses)
24
25
tests. expect ( nil : link. suffix)
25
26
}
26
27
if let tests: TestGroup = tests / " SlashDot " ,
@@ -29,6 +30,7 @@ extension Main.ParseCodelink:TestBattery
29
30
tests. expect ( link. base ==? . relative)
30
31
tests. expect ( link. path. components ..? [ " Unicode " , " Scalar " , " value " ] )
31
32
tests. expect ( link. path. visible ..? [ " Scalar " , " value " ] )
33
+ tests. expect ( false : link. path. hasTrailingParentheses)
32
34
tests. expect ( nil : link. suffix)
33
35
}
34
36
if let tests: TestGroup = tests / " DotSlash " ,
@@ -37,6 +39,7 @@ extension Main.ParseCodelink:TestBattery
37
39
tests. expect ( link. base ==? . relative)
38
40
tests. expect ( link. path. components ..? [ " Unicode " , " Scalar " , " value " ] )
39
41
tests. expect ( link. path. visible ..? [ " value " ] )
42
+ tests. expect ( false : link. path. hasTrailingParentheses)
40
43
tests. expect ( nil : link. suffix)
41
44
}
42
45
if let tests: TestGroup = tests / " SlashSlash " ,
@@ -45,6 +48,7 @@ extension Main.ParseCodelink:TestBattery
45
48
tests. expect ( link. base ==? . relative)
46
49
tests. expect ( link. path. components ..? [ " Unicode " , " Scalar " , " value " ] )
47
50
tests. expect ( link. path. visible ..? [ " value " ] )
51
+ tests. expect ( false : link. path. hasTrailingParentheses)
48
52
tests. expect ( nil : link. suffix)
49
53
}
50
54
if let tests: TestGroup = tests / " SingleCharacter " ,
@@ -53,6 +57,7 @@ extension Main.ParseCodelink:TestBattery
53
57
tests. expect ( link. base ==? . relative)
54
58
tests. expect ( link. path. components ..? [ " x " ] )
55
59
tests. expect ( link. path. visible ..? [ " x " ] )
60
+ tests. expect ( false : link. path. hasTrailingParentheses)
56
61
tests. expect ( nil : link. suffix)
57
62
}
58
63
@@ -62,6 +67,7 @@ extension Main.ParseCodelink:TestBattery
62
67
tests. expect ( link. base ==? . relative)
63
68
tests. expect ( link. path. components ..? [ " Real " , " ..(_:_:) " ] )
64
69
tests. expect ( link. path. visible ..? [ " Real " , " ..(_:_:) " ] )
70
+ tests. expect ( true : link. path. hasTrailingParentheses)
65
71
tests. expect ( nil : link. suffix)
66
72
}
67
73
if let tests: TestGroup = tests / " Real " / " 2 " ,
@@ -70,6 +76,7 @@ extension Main.ParseCodelink:TestBattery
70
76
tests. expect ( link. base ==? . relative)
71
77
tests. expect ( link. path. components ..? [ " Real " , " ..(_:_:) " ] )
72
78
tests. expect ( link. path. visible ..? [ " ..(_:_:) " ] )
79
+ tests. expect ( true : link. path. hasTrailingParentheses)
73
80
tests. expect ( nil : link. suffix)
74
81
}
75
82
if let tests: TestGroup = tests / " Real " / " 3 " ,
@@ -78,6 +85,7 @@ extension Main.ParseCodelink:TestBattery
78
85
tests. expect ( link. base ==? . relative)
79
86
tests. expect ( link. path. components ..? [ " Real " , " ...(_:_:) " ] )
80
87
tests. expect ( link. path. visible ..? [ " Real " , " ...(_:_:) " ] )
88
+ tests. expect ( true : link. path. hasTrailingParentheses)
81
89
tests. expect ( nil : link. suffix)
82
90
}
83
91
if let tests: TestGroup = tests / " Real " / " 4 " ,
@@ -86,6 +94,7 @@ extension Main.ParseCodelink:TestBattery
86
94
tests. expect ( link. base ==? . relative)
87
95
tests. expect ( link. path. components ..? [ " Real " , " ...(_:_:) " ] )
88
96
tests. expect ( link. path. visible ..? [ " ...(_:_:) " ] )
97
+ tests. expect ( true : link. path. hasTrailingParentheses)
89
98
tests. expect ( nil : link. suffix)
90
99
}
91
100
if let tests: TestGroup = tests / " Real " / " 5 " ,
@@ -94,6 +103,7 @@ extension Main.ParseCodelink:TestBattery
94
103
tests. expect ( link. base ==? . relative)
95
104
tests. expect ( link. path. components ..? [ " Real " , " /(_:_:) " ] )
96
105
tests. expect ( link. path. visible ..? [ " Real " , " /(_:_:) " ] )
106
+ tests. expect ( true : link. path. hasTrailingParentheses)
97
107
tests. expect ( nil : link. suffix)
98
108
}
99
109
if let tests: TestGroup = tests / " Real " / " 6 " ,
@@ -102,6 +112,7 @@ extension Main.ParseCodelink:TestBattery
102
112
tests. expect ( link. base ==? . relative)
103
113
tests. expect ( link. path. components ..? [ " Real " , " /(_:_:) " ] )
104
114
tests. expect ( link. path. visible ..? [ " /(_:_:) " ] )
115
+ tests. expect ( true : link. path. hasTrailingParentheses)
105
116
tests. expect ( nil : link. suffix)
106
117
}
107
118
if let tests: TestGroup = tests / " Real " / " 7 " ,
@@ -110,6 +121,7 @@ extension Main.ParseCodelink:TestBattery
110
121
tests. expect ( link. base ==? . relative)
111
122
tests. expect ( link. path. components ..? [ " Real " , " ./.(_:_:) " ] )
112
123
tests. expect ( link. path. visible ..? [ " Real " , " ./.(_:_:) " ] )
124
+ tests. expect ( true : link. path. hasTrailingParentheses)
113
125
tests. expect ( nil : link. suffix)
114
126
}
115
127
if let tests: TestGroup = tests / " Real " / " 8 " ,
@@ -118,6 +130,7 @@ extension Main.ParseCodelink:TestBattery
118
130
tests. expect ( link. base ==? . relative)
119
131
tests. expect ( link. path. components ..? [ " Real " , " ./.(_:_:) " ] )
120
132
tests. expect ( link. path. visible ..? [ " ./.(_:_:) " ] )
133
+ tests. expect ( true : link. path. hasTrailingParentheses)
121
134
tests. expect ( nil : link. suffix)
122
135
}
123
136
if let tests: TestGroup = tests / " EmptyTrailingParentheses " ,
@@ -126,7 +139,7 @@ extension Main.ParseCodelink:TestBattery
126
139
tests. expect ( link. base ==? . relative)
127
140
tests. expect ( link. path. components ..? [ " Real " , " init " ] )
128
141
tests. expect ( link. path. visible ..? [ " Real " , " init " ] )
129
- tests. expect ( true : link. path. hasEmptyTrailingParentheses )
142
+ tests. expect ( true : link. path. hasTrailingParentheses )
130
143
tests. expect ( nil : link. suffix)
131
144
}
132
145
if let tests: TestGroup = tests / " EmptyTrailingComponent " ,
@@ -135,6 +148,7 @@ extension Main.ParseCodelink:TestBattery
135
148
tests. expect ( link. base ==? . relative)
136
149
tests. expect ( link. path. components ..? [ " Real " , " init " ] )
137
150
tests. expect ( link. path. visible ..? [ " Real " , " init " ] )
151
+ tests. expect ( false : link. path. hasTrailingParentheses)
138
152
tests. expect ( nil : link. suffix)
139
153
}
140
154
if let tests: TestGroup = tests / " DivisionOperator " ,
@@ -143,6 +157,7 @@ extension Main.ParseCodelink:TestBattery
143
157
tests. expect ( link. base ==? . relative)
144
158
tests. expect ( link. path. components ..? [ " /(_:_:) " ] )
145
159
tests. expect ( link. path. visible ..? [ " /(_:_:) " ] )
160
+ tests. expect ( true : link. path. hasTrailingParentheses)
146
161
tests. expect ( nil : link. suffix)
147
162
}
148
163
if let tests: TestGroup = tests / " CustomOperator " ,
@@ -151,6 +166,7 @@ extension Main.ParseCodelink:TestBattery
151
166
tests. expect ( link. base ==? . relative)
152
167
tests. expect ( link. path. components ..? [ " /-/(_:_:) " ] )
153
168
tests. expect ( link. path. visible ..? [ " /-/(_:_:) " ] )
169
+ tests. expect ( true : link. path. hasTrailingParentheses)
154
170
tests. expect ( nil : link. suffix)
155
171
}
156
172
if let tests: TestGroup = tests / " ClosedRangeOperator " ,
@@ -159,6 +175,7 @@ extension Main.ParseCodelink:TestBattery
159
175
tests. expect ( link. base ==? . relative)
160
176
tests. expect ( link. path. components ..? [ " ...(_:_:) " ] )
161
177
tests. expect ( link. path. visible ..? [ " ...(_:_:) " ] )
178
+ tests. expect ( true : link. path. hasTrailingParentheses)
162
179
tests. expect ( nil : link. suffix)
163
180
}
164
181
}
@@ -169,6 +186,7 @@ extension Main.ParseCodelink:TestBattery
169
186
{
170
187
tests. expect ( link. base ==? . relative)
171
188
tests. expect ( link. path. components ..? [ " Fake " ] )
189
+ tests. expect ( false : link. path. hasTrailingParentheses)
172
190
tests. expect ( link. suffix ==? . filter( . enum) )
173
191
}
174
192
if let tests: TestGroup = tests / " Fake " / " UncannyHash " ,
@@ -178,13 +196,15 @@ extension Main.ParseCodelink:TestBattery
178
196
179
197
tests. expect ( link. base ==? . relative)
180
198
tests. expect ( link. path. components ..? [ " Fake " ] )
199
+ tests. expect ( false : link. path. hasTrailingParentheses)
181
200
tests. expect ( link. suffix ==? . hash( hash) )
182
201
}
183
202
if let tests: TestGroup = tests / " Fake " / " ClassVar " ,
184
203
let link: UCF . Selector = tests. roundtrip ( " Fake.max [class var] " )
185
204
{
186
205
tests. expect ( link. base ==? . relative)
187
206
tests. expect ( link. path. components ..? [ " Fake " , " max " ] )
207
+ tests. expect ( false : link. path. hasTrailingParentheses)
188
208
tests. expect ( link. suffix ==? . filter( . class_var) )
189
209
}
190
210
}
@@ -196,6 +216,7 @@ extension Main.ParseCodelink:TestBattery
196
216
tests. expect ( link. base ==? . relative)
197
217
tests. expect ( link. path. components ..? [ " Sloth " , " Color " ] )
198
218
tests. expect ( link. path. visible ..? [ " Color " ] )
219
+ tests. expect ( false : link. path. hasTrailingParentheses)
199
220
tests. expect ( nil : link. suffix)
200
221
}
201
222
if let tests: TestGroup = tests / " Filter " ,
@@ -204,6 +225,7 @@ extension Main.ParseCodelink:TestBattery
204
225
tests. expect ( link. base ==? . relative)
205
226
tests. expect ( link. path. components ..? [ " Sloth " , " Color " ] )
206
227
tests. expect ( link. path. visible ..? [ " Color " ] )
228
+ tests. expect ( false : link. path. hasTrailingParentheses)
207
229
tests. expect ( link. suffix ==? . filter( . enum) )
208
230
}
209
231
if let tests: TestGroup = tests / " FilterInterior " ,
@@ -212,6 +234,7 @@ extension Main.ParseCodelink:TestBattery
212
234
tests. expect ( link. base ==? . relative)
213
235
tests. expect ( link. path. components ..? [ " Sloth " , " Color " ] )
214
236
tests. expect ( link. path. visible ..? [ " Color " ] )
237
+ tests. expect ( false : link. path. hasTrailingParentheses)
215
238
tests. expect ( nil : link. suffix)
216
239
}
217
240
if let tests: TestGroup = tests / " FilterLegacy " ,
@@ -220,6 +243,7 @@ extension Main.ParseCodelink:TestBattery
220
243
tests. expect ( link. base ==? . relative)
221
244
tests. expect ( link. path. components ..? [ " Sloth " , " Color " ] )
222
245
tests. expect ( link. path. visible ..? [ " Color " ] )
246
+ tests. expect ( false : link. path. hasTrailingParentheses)
223
247
tests. expect ( link. suffix ==? . legacy( . class, nil ) )
224
248
}
225
249
if let tests: TestGroup = tests / " FilterAndHash " ,
@@ -230,6 +254,7 @@ extension Main.ParseCodelink:TestBattery
230
254
tests. expect ( link. base ==? . relative)
231
255
tests. expect ( link. path. components ..? [ " Sloth " , " Color " ] )
232
256
tests. expect ( link. path. visible ..? [ " Color " ] )
257
+ tests. expect ( false : link. path. hasTrailingParentheses)
233
258
tests. expect ( link. suffix ==? . legacy( . struct, hash) )
234
259
}
235
260
if let tests: TestGroup = tests / " Hash " ,
@@ -240,6 +265,7 @@ extension Main.ParseCodelink:TestBattery
240
265
tests. expect ( link. base ==? . relative)
241
266
tests. expect ( link. path. components ..? [ " Sloth " , " update(_:) " ] )
242
267
tests. expect ( link. path. visible ..? [ " update(_:) " ] )
268
+ tests. expect ( true : link. path. hasTrailingParentheses)
243
269
tests. expect ( link. suffix ==? . hash( hash) )
244
270
}
245
271
if let tests: TestGroup = tests / " Hash " / " Minus " ,
@@ -250,6 +276,7 @@ extension Main.ParseCodelink:TestBattery
250
276
tests. expect ( link. base ==? . relative)
251
277
tests. expect ( link. path. components ..? [ " Sloth " , " -(_:) " ] )
252
278
tests. expect ( link. path. visible ..? [ " -(_:) " ] )
279
+ tests. expect ( true : link. path. hasTrailingParentheses)
253
280
tests. expect ( link. suffix ==? . hash( hash) )
254
281
}
255
282
if let tests: TestGroup = tests / " Hash " / " Slinging " / " Slasher " ,
@@ -260,6 +287,7 @@ extension Main.ParseCodelink:TestBattery
260
287
tests. expect ( link. base ==? . relative)
261
288
tests. expect ( link. path. components ..? [ " Sloth " , " /(_:) " ] )
262
289
tests. expect ( link. path. visible ..? [ " /(_:) " ] )
290
+ tests. expect ( true : link. path. hasTrailingParentheses)
263
291
tests. expect ( link. suffix ==? . hash( hash) )
264
292
}
265
293
}
@@ -271,6 +299,7 @@ extension Main.ParseCodelink:TestBattery
271
299
tests. expect ( link. base ==? . qualified)
272
300
tests. expect ( link. path. components ..? [ " Swift " ] )
273
301
tests. expect ( link. path. visible ..? [ " Swift " ] )
302
+ tests. expect ( false : link. path. hasTrailingParentheses)
274
303
tests. expect ( nil : link. suffix)
275
304
}
276
305
if let tests: TestGroup = tests / " Hidden " ,
@@ -279,6 +308,7 @@ extension Main.ParseCodelink:TestBattery
279
308
tests. expect ( link. base ==? . qualified)
280
309
tests. expect ( link. path. components ..? [ " Swift " , " Int " ] )
281
310
tests. expect ( link. path. visible ..? [ " Int " ] )
311
+ tests. expect ( false : link. path. hasTrailingParentheses)
282
312
tests. expect ( nil : link. suffix)
283
313
}
284
314
if let tests: TestGroup = tests / " Visible " ,
@@ -287,6 +317,7 @@ extension Main.ParseCodelink:TestBattery
287
317
tests. expect ( link. base ==? . qualified)
288
318
tests. expect ( link. path. components ..? [ " Swift " , " Int " ] )
289
319
tests. expect ( link. path. visible ..? [ " Swift " , " Int " ] )
320
+ tests. expect ( false : link. path. hasTrailingParentheses)
290
321
tests. expect ( nil : link. suffix)
291
322
}
292
323
if let tests: TestGroup = tests / " EmptyTrailingComponent " ,
@@ -295,6 +326,7 @@ extension Main.ParseCodelink:TestBattery
295
326
tests. expect ( link. base ==? . qualified)
296
327
tests. expect ( link. path. components ..? [ " Swift " , " Int " ] )
297
328
tests. expect ( link. path. visible ..? [ " Swift " , " Int " ] )
329
+ tests. expect ( false : link. path. hasTrailingParentheses)
298
330
tests. expect ( nil : link. suffix)
299
331
}
300
332
}
0 commit comments