Skip to content

Commit 5251750

Browse files
committed
Conditionalize tests to supported OSes only
1 parent 8107928 commit 5251750

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test/Casting/TypeOf_ExtendedExistential.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ CastsTests.test("type(of:) should look through extended existentials (none)") {
4040
struct C<T>: Box { var t: T }
4141
func genericErase<T>(_ value: T) -> Any { value }
4242
let c: any Box<Int> = C(t: 42)
43-
if #available(macOS 13.0, *) {
43+
if #available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) {
4444
let x = genericErase(c)
4545
expectEqual("C<Int>", "\(type(of:x))")
4646
} else {
@@ -60,7 +60,7 @@ CastsTests.test("type(of:) should look through extended existentials (class)") {
6060
}
6161
func genericErase<T>(_ value: T) -> Any { value }
6262
let c: any OBox<Int> = C(t: 42)
63-
if #available(macOS 13.0, *) {
63+
if #available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) {
6464
let x = genericErase(c)
6565
expectEqual("C<Int>", "\(type(of:x))")
6666
} else {
@@ -73,7 +73,7 @@ CastsTests.test("type(of:) should look through extended existentials (metatype)"
7373
struct C<T>: Box { var t: T }
7474
func genericErase<T>(_ value: T) -> Any { value }
7575
let t: any Box<Int>.Type = C<Int>.self
76-
if #available(macOS 13.0, *) {
76+
if #available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) {
7777
let x = genericErase(t)
7878
expectEqual("C<Int>.Type", "\(type(of:x))")
7979
} else {

test/stdlib/Mirror.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ mirrors.test("Extended Existential (struct)") {
934934
value
935935
}
936936
let container: any Box<Int> = Container(value: 42)
937-
if #available(macOS 13, *) {
937+
if #available(iOS 16, macOS 13, tvOS 16, watchOS 9, *) {
938938
let subject = genericErase(container)
939939
let mirror = Mirror(reflecting: subject)
940940
let children = mirror.children
@@ -959,7 +959,7 @@ mirrors.test("Extended Existential (class)") {
959959
value
960960
}
961961
let container: any OBox<Int> = Container(value: 42)
962-
if #available(macOS 13, *) {
962+
if #available(iOS 16, macOS 13, tvOS 16, watchOS 9, *) {
963963
let subject = genericErase(container)
964964
let mirror = Mirror(reflecting: subject)
965965
let children = mirror.children
@@ -979,7 +979,7 @@ mirrors.test("Extended Existential (metatype)") {
979979
value
980980
}
981981
let t: any Box<Int>.Type = Container<Int>.self
982-
if #available(macOS 13, *) {
982+
if #available(iOS 16, macOS 13, tvOS 16, watchOS 9, *) {
983983
let subject = genericErase(t)
984984
let mirror = Mirror(reflecting: subject)
985985
let children = mirror.children

0 commit comments

Comments
 (0)