Commit 0b92f0e
committed
Make XCTestExpectation Sendable
This makes the `XCTestExpectation` class hierarchy conform to `Sendable`. This class and its descendants are designed to be used concurrently and are already internally concurrency-safe, so this conformance formally permits them to be used in Swift Concurrency APIs which enforce sendability.
Includes a build-only test which has concurrency warnings enabled to validate the fix.
rdar://957464541 parent 36d50c0 commit 0b92f0e
File tree
2 files changed
+13
-1
lines changed- Sources/XCTest/Public/Asynchronous
- Tests/Functional/Asynchronous/ExpectationsWithConcurrency
2 files changed
+13
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments