Commit 8836b38
authored
Make all test content types directly conform to
This PR eliminates the `TestContentAccessorResult` associated type from
the (currently internal, potentially eventually API) `TestContent`
protocol. This associated type needed to be `~Copyable` so `ExitTest`
could be used with it, but that appears to pose some _problems_ for the
compiler (rdar://143049814&143080508).
Instead, we remove the associated type and just say "the test content
record is the type that conforms to `TestContent`". `ExitTest` is happy
with this, but `Test`'s produced type is a non-nominal function type, so
we wrap that function in a small private type with identical layout and
have that type conform.
The ultimate purpose of this PR is to get us a bit closer to turning
`TestContent` into a public or tools-SPI protocol that other components
can use for test discovery.
### 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.TestContent. (#920)1 parent fb95c48 commit 8836b38
File tree
6 files changed
+60
-37
lines changed- Documentation/ABI
- Sources/Testing
- ExitTests
- Tests/TestingTests
6 files changed
+60
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
66 | 77 | | |
67 | 78 | | |
68 | 79 | | |
| |||
79 | 90 | | |
80 | 91 | | |
81 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
82 | 96 | | |
83 | 97 | | |
84 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 51 | + | |
60 | 52 | | |
61 | 53 | | |
62 | 54 | | |
| |||
75 | 67 | | |
76 | 68 | | |
77 | 69 | | |
78 | | - | |
| 70 | + | |
79 | 71 | | |
80 | 72 | | |
81 | 73 | | |
| |||
93 | 85 | | |
94 | 86 | | |
95 | 87 | | |
96 | | - | |
97 | 88 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | 89 | | |
102 | 90 | | |
103 | 91 | | |
| |||
109 | 97 | | |
110 | 98 | | |
111 | 99 | | |
112 | | - | |
113 | | - | |
114 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
115 | 103 | | |
116 | 104 | | |
117 | 105 | | |
118 | | - | |
| 106 | + | |
119 | 107 | | |
120 | 108 | | |
121 | 109 | | |
122 | 110 | | |
123 | | - | |
| 111 | + | |
124 | 112 | | |
125 | 113 | | |
126 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | 231 | | |
233 | 232 | | |
234 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
17 | 30 | | |
18 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
19 | 34 | | |
20 | 35 | | |
21 | 36 | | |
| |||
43 | 58 | | |
44 | 59 | | |
45 | 60 | | |
46 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
47 | 67 | | |
48 | 68 | | |
49 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
586 | | - | |
| 586 | + | |
| 587 | + | |
587 | 588 | | |
588 | 589 | | |
589 | 590 | | |
| |||
593 | 594 | | |
594 | 595 | | |
595 | 596 | | |
596 | | - | |
| 597 | + | |
597 | 598 | | |
598 | 599 | | |
599 | 600 | | |
| |||
618 | 619 | | |
619 | 620 | | |
620 | 621 | | |
621 | | - | |
| 622 | + | |
622 | 623 | | |
623 | 624 | | |
624 | 625 | | |
| |||
628 | 629 | | |
629 | 630 | | |
630 | 631 | | |
631 | | - | |
| 632 | + | |
632 | 633 | | |
633 | | - | |
634 | | - | |
| 634 | + | |
| 635 | + | |
635 | 636 | | |
636 | 637 | | |
637 | 638 | | |
638 | | - | |
| 639 | + | |
| 640 | + | |
639 | 641 | | |
640 | 642 | | |
641 | 643 | | |
642 | | - | |
| 644 | + | |
643 | 645 | | |
644 | 646 | | |
645 | 647 | | |
646 | 648 | | |
647 | 649 | | |
648 | 650 | | |
649 | | - | |
| 651 | + | |
650 | 652 | | |
651 | 653 | | |
652 | 654 | | |
653 | 655 | | |
654 | 656 | | |
655 | 657 | | |
656 | | - | |
| 658 | + | |
657 | 659 | | |
658 | 660 | | |
659 | 661 | | |
| |||
0 commit comments