Commit d611120
authored
Expand parameterized testing documentation to mention try/await support and showcase helper pattern (#1133)
This expands a few places where we document parameterized testing APIs
to mention `try`/`await` support and showcase a common pattern for
sharing arguments between multiple tests.
### Modifications:
- For each `@Test` macro which accepts arguments, mention that `try` and
`await` are supported and that arguments are lazily evaluated.
- In the "Implementing parameterized tests" article, add a new section
titled "Pass the same arguments to multiple test functions" showcasing
the pattern of extracting common arguments to a separate property.
- Add a [`> Tip:`
callout](https://www.swift.org/documentation/docc/other-formatting-options#Add-Notes-and-Other-Asides)
within that new article section mentioning `try`/`await` support.
### Checklist:
- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
Fixes rdar://1309290601 parent d5b5c59 commit d611120
File tree
2 files changed
+53
-8
lines changed- Sources/Testing
- Testing.docc
2 files changed
+53
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
221 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
222 | 224 | | |
223 | 225 | | |
224 | 226 | | |
| |||
270 | 272 | | |
271 | 273 | | |
272 | 274 | | |
273 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
274 | 279 | | |
275 | 280 | | |
276 | 281 | | |
| |||
298 | 303 | | |
299 | 304 | | |
300 | 305 | | |
301 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
302 | 310 | | |
303 | 311 | | |
304 | 312 | | |
| |||
324 | 332 | | |
325 | 333 | | |
326 | 334 | | |
327 | | - | |
328 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
329 | 340 | | |
330 | 341 | | |
331 | 342 | | |
| |||
352 | 363 | | |
353 | 364 | | |
354 | 365 | | |
355 | | - | |
356 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
357 | 371 | | |
358 | 372 | | |
359 | 373 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
104 | 135 | | |
105 | 136 | | |
106 | 137 | | |
| |||
0 commit comments