We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 36d50c0 + 0b92f0e commit b55f02fCopy full SHA for b55f02f
Sources/XCTest/Public/Asynchronous/XCTestExpectation.swift
@@ -11,7 +11,7 @@
11
//
12
13
/// Expectations represent specific conditions in asynchronous testing.
14
-open class XCTestExpectation {
+open class XCTestExpectation: @unchecked Sendable {
15
16
private static var currentMonotonicallyIncreasingToken: UInt64 = 0
17
private static func queue_nextMonotonicallyIncreasingToken() -> UInt64 {
Tests/Functional/Asynchronous/ExpectationsWithConcurrency/main.swift
@@ -0,0 +1,12 @@
1
+// RUN: %{swiftc} %s -typecheck -warn-concurrency -warnings-as-errors
2
+
3
+#if os(macOS)
4
+ import SwiftXCTest
5
+#else
6
+ import XCTest
7
+#endif
8
9
+let expectation = XCTestExpectation()
10
+Task.detached {
+ expectation.fulfill()
+}
0 commit comments