Skip to content

Commit ca1e808

Browse files
Replace all 9999 availability in non-stdlib tests. (swiftlang#26109)
Replace all 9999 availability in non-stdlib tests with the appropriate platform availability.
1 parent 690409d commit ca1e808

20 files changed

+112
-118
lines changed

test/IRGen/opaque_result_type_access_path.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ extension X : P where T : P {
3131
}
3232
}
3333

34-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
34+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
3535
func bar() -> some P {
3636
return 27
3737
}
3838

39-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
39+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
4040
func foo() -> some P {
4141
return X(bar())
4242
}
4343

4444
// CHECK: 27
45-
if #available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *) {
45+
if #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) {
4646
print(foo().get())
4747
} else {
4848
print(27)

test/Interpreter/Inputs/dynamic_replacement_opaque1.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ extension Int: P {
99

1010
}
1111

12-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
12+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
1313
func bar(_ x: Int) -> some P {
1414
return x
1515
}
1616

1717
struct Container {
18-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
18+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
1919
func bar(_ x: Int) -> some P {
2020
return x
2121
}
2222

23-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
23+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
2424
var computedProperty : some P {
2525
get {
2626
return 2
@@ -30,7 +30,7 @@ struct Container {
3030
}
3131
}
3232

33-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
33+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
3434
subscript(_ x: Int) -> some P {
3535
get {
3636
return 2
@@ -49,12 +49,12 @@ extension Int : Q {}
4949

5050
public protocol Assoc {
5151
associatedtype A = Int
52-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
52+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
5353
func act() -> A
5454
}
5555

5656
struct Test : Assoc {
57-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
57+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
5858
func act() -> some Q {
5959
return 1
6060
}

test/Interpreter/Inputs/dynamic_replacement_opaque2.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ struct Pair : P {
88
}
99
}
1010

11-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
11+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
1212
@_dynamicReplacement(for:bar(_:))
1313
func _replacement_bar(y x: Int) -> some P {
1414
return Pair()
1515
}
1616

1717
extension Container {
18-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
18+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
1919
@_dynamicReplacement(for:bar(_:))
2020
func _replacement_bar(y x: Int) -> some P {
2121
return Pair()
2222
}
2323

24-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
24+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
2525
@_dynamicReplacement(for: computedProperty)
2626
var _replacement_computedProperty : some P {
2727
get {
@@ -32,7 +32,7 @@ extension Container {
3232
}
3333
}
3434

35-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
35+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
3636
@_dynamicReplacement(for: subscript(_:))
3737
subscript(y x: Int) -> some P {
3838
get {
@@ -45,7 +45,7 @@ extension Container {
4545
}
4646

4747
extension Test {
48-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
48+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
4949
@_dynamicReplacement(for: act)
5050
func act_r() -> some Q {
5151
return NewType()

test/Interpreter/SDK/SwiftNativeNSXXXCoding.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private func test<T: NSObject & NSCoding>(type: T.Type) {
3131
// Test all the classes listed in SwiftNativeNSXXXBase.mm.gyb except for
3232
// NSEnumerator (which doesn't conform to NSCoding).
3333

34-
if #available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *) {
34+
if #available(iOS 13, macOS 10.15, tvOS 13, watchOS 6, *) {
3535
testSuite.test("NSArray") {
3636
test(type: NSArray.self)
3737
}

test/Interpreter/SDK/check_class_for_archiving.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ print("DerivedClassWithName: \(NSKeyedUnarchiver._swift_checkClassAndWarnForKeye
5252
// CHECK: NSKeyedUnarchiver: 0
5353
print("NSKeyedUnarchiver: \(NSKeyedUnarchiver._swift_checkClassAndWarnForKeyedArchiving(NSKeyedUnarchiver.self, operation: op))")
5454

55-
if #available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *) {
55+
if #available(iOS 13, macOS 10.15, tvOS 13, watchOS 6, *) {
5656
// CHECK: PrivateClass: 2
5757
print("PrivateClass: \(NSKeyedUnarchiver._swift_checkClassAndWarnForKeyedArchiving(PrivateClass.self, operation: op))")
5858
// CHECK: GenericClass: 1

test/Interpreter/SDK/check_class_for_archiving_log.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import Foundation
1414

1515
// A tricky way to make the FileCheck tests conditional on the OS version.
16-
if #available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *) {
16+
if #available(iOS 13, macOS 10.15, tvOS 13, watchOS 6, *) {
1717
print("-check-prefix=CHECK")
1818
} else {
1919
// Disable the checks for older OSes because of rdar://problem/50504765

test/Interpreter/SDK/objc_getClass.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ testSuite.test("GenericMangled")
179179
reason: "objc_getClass hook not present"))
180180
.requireOwnProcess()
181181
.code {
182-
guard #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) else { return }
182+
guard #available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) else { return }
183183
requireClass(named: "_TtC4main24ConstrainedSwiftSubclass",
184184
demangledName: "main.ConstrainedSwiftSubclass")
185185
requireClass(named: "_TtC4main26ConstrainedSwiftSuperclass",
@@ -226,7 +226,7 @@ testSuite.test("ResilientNSObject")
226226
reason: "objc_getClass hook not present"))
227227
.requireOwnProcess()
228228
.code {
229-
guard #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) else { return }
229+
guard #available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) else { return }
230230
requireClass(named: "_TtC4main27ResilientSubclassOfNSObject",
231231
demangledName: "main.ResilientSubclassOfNSObject")
232232
requireClass(named: "_TtC4main34ResilientSubclassOfGenericNSObject",

test/Interpreter/arrays.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,4 @@ do {
182182
// CHECK: deinit called
183183
// CHECK: error thrown
184184
print("error thrown")
185-
}
185+
}

test/Interpreter/dynamic_replacement_multifile/Inputs/dynamic_replacement_multi_file_A.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@ func replaceable1_r() -> Int {
77
return 2
88
}
99

10-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
10+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
1111
dynamic func bar1(_ x: Int) -> some P {
1212
return x
1313
}
1414

15-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
15+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
1616
@_dynamicReplacement(for: bar1(_:))
1717
func bar1_r(_ x: Int) -> some P {
1818
return Pair()
1919
}
2020

21-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
21+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
2222
dynamic func bar2(_ x: Int) -> some P {
2323
return x
2424
}
2525

26-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
26+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
2727
@_dynamicReplacement(for: bar2(_:))
2828
func bar2_r(_ x: Int) -> some P {
2929
return Pair()

test/Interpreter/dynamic_replacement_multifile/Inputs/dynamic_replacement_multi_file_B.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ func replaceable2_r() -> Int {
77
return 3
88
}
99

10-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
10+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
1111
dynamic func bar3(_ x: Int) -> some P {
1212
return x
1313
}
1414

15-
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
15+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
1616
@_dynamicReplacement(for: bar3(_:))
1717
func bar3_r(_ x: Int) -> some P {
1818
return Pair()

0 commit comments

Comments
 (0)