[Concurrency][Tests] Bump availability in a couple of tests.

Since we've bumped availability elsewhere, we need to bump these
tests also.
This commit is contained in:
Alastair Houghton
2025-11-18 12:08:46 +00:00
parent 629d708577
commit 748ba05161
2 changed files with 4 additions and 4 deletions

View File

@@ -203,7 +203,7 @@ await Task.detached { @SomeGlobalActor in
// CHECK: Testing a separate task off the main actor
print("Testing a separate task off the main actor")
await Task.detached {
if #available(SwiftStdlib 6.2, *) {
if #available(SwiftStdlib 6.3, *) {
// Skip tests on platforms that use the same executor for the main
// actor and the global concurrent executor.
guard Task.defaultExecutor !== MainActor.executor else { return }

View File

@@ -15,14 +15,14 @@
import Dispatch
import StdlibUnittest
@available(SwiftStdlib 6.2, *)
@available(SwiftStdlib 6.3, *)
actor MyActor {
public func doSleep() async {
try! await Task.sleep(for: .seconds(0.1))
}
}
@available(SwiftStdlib 6.2, *)
@available(SwiftStdlib 6.3, *)
final class TestExecutor: TaskExecutor, SchedulingExecutor, @unchecked Sendable {
var asScheduling: SchedulingExecutor? {
return self
@@ -58,7 +58,7 @@ final class TestExecutor: TaskExecutor, SchedulingExecutor, @unchecked Sendable
}
}
@available(SwiftStdlib 6.2, *)
@available(SwiftStdlib 6.3, *)
@main struct Main {
static func main() async {
let tests = TestSuite("sleep_executor")