Commit c314907
authored
Report a skipped event for parameterized tests with no cases (#572)
When a parameterized test's argument list is empty, a "skip" event is a
better reflection of the fact that the test function doesn't actually
get executed.
With this change, a `.testSkipped` event will get posted for such tests,
instead of a `.testStarted` + `.testEnded` event pair.
This also means that the following tests will be reported very similarly
(with just a different comment on the `SkipInfo`):
```
@test(arguments: Array<Int>()) func t1(x: Int) {}
@test(.disabled(), arguments: [1]) func t2(x: Int) {}
```
### 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.1 parent d2dfc3f commit c314907
File tree
2 files changed
+23
-0
lines changed- Sources/Testing/Running
- Tests/TestingTests
2 files changed
+23
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
266 | 271 | | |
267 | 272 | | |
268 | 273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
204 | 222 | | |
205 | 223 | | |
206 | 224 | | |
| |||
0 commit comments