Skip to content

Commit bd010c3

Browse files
Merge pull request swiftlang#37369 from aschwaighofer/availability_macro_concurrency_tests
Use availability macro insteada of macOS 9999 in Concurrency tests
2 parents 29883c8 + 887902e commit bd010c3

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

test/Concurrency/Runtime/async_task_locals_basic.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func printTaskLocalAsync<V>(
5454
printTaskLocal(key, expected, file: file, line: line)
5555
}
5656

57-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
57+
@available(SwiftStdlib 5.5, *)
5858
@discardableResult
5959
func printTaskLocal<V>(
6060
_ key: TaskLocal<V>,
@@ -156,7 +156,7 @@ func nested_3_onlyTopContributes() async {
156156
printTaskLocal(TL.$string) // CHECK-NEXT: TaskLocal<String>(defaultValue: <undefined>) (<undefined>)
157157
}
158158

159-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
159+
@available(SwiftStdlib 5.5, *)
160160
func nested_3_onlyTopContributesAsync() async {
161161
await printTaskLocalAsync(TL.$string) // CHECK: TaskLocal<String>(defaultValue: <undefined>) (<undefined>)
162162
await TL.$string.withValue("one") {
@@ -173,7 +173,7 @@ func nested_3_onlyTopContributesAsync() async {
173173
await printTaskLocalAsync(TL.$string) // CHECK-NEXT: TaskLocal<String>(defaultValue: <undefined>) (<undefined>)
174174
}
175175

176-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
176+
@available(SwiftStdlib 5.5, *)
177177
func nested_3_onlyTopContributesMixed() async {
178178
await printTaskLocalAsync(TL.$string) // CHECK: TaskLocal<String>(defaultValue: <undefined>) (<undefined>)
179179
await TL.$string.withValue("one") {

test/Concurrency/Runtime/async_task_locals_copy_to_async.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
// UNSUPPORTED: use_os_stdlib
99
// UNSUPPORTED: back_deployment_runtime
1010

11-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
11+
@available(SwiftStdlib 5.5, *)
1212
enum TL {
1313
@TaskLocal
1414
static var number: Int = 0
1515
@TaskLocal
1616
static var other: Int = 0
1717
}
1818

19-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
19+
@available(SwiftStdlib 5.5, *)
2020
@discardableResult
2121
func printTaskLocal<V>(
2222
_ key: TaskLocal<V>,
@@ -34,7 +34,7 @@ func printTaskLocal<V>(
3434

3535
// ==== ------------------------------------------------------------------------
3636

37-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
37+
@available(SwiftStdlib 5.5, *)
3838
func copyTo_async() async {
3939
await TL.$number.withValue(1111) {
4040
printTaskLocal(TL.$number) // CHECK: TaskLocal<Int>(defaultValue: 0) (1111)
@@ -58,7 +58,7 @@ func copyTo_async() async {
5858
}
5959
}
6060

61-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
61+
@available(SwiftStdlib 5.5, *)
6262
func copyTo_async_noWait() async {
6363
print(#function)
6464
TL.$number.withValue(1111) {
@@ -80,7 +80,7 @@ func copyTo_async_noWait() async {
8080
await Task.sleep(2 * second)
8181
}
8282

83-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
83+
@available(SwiftStdlib 5.5, *)
8484
@main struct Main {
8585
static func main() async {
8686
await copyTo_async()

0 commit comments

Comments
 (0)