Skip to content

Commit f2ae170

Browse files
committed
fix: Add platform checks for CapturedTest
1 parent 23c94e5 commit f2ae170

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Tests/CaptureTests/CapturedTests.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
import Testing
22
@_spi(Internals) import Capture
33

4+
45
@Suite
56
struct CapturedTests {
67
class Object {}
78

89
@Test
10+
@available(
11+
iOS 16.0, macOS 13.0,
12+
macCatalyst 13.0, tvOS 16.0,
13+
watchOS 9.0, visionOS 1.0, *
14+
)
915
func weakCapture() async throws {
1016
do { // basic
1117
let object: Object = .init()
@@ -83,6 +89,11 @@ struct CapturedTests {
8389
}
8490

8591
@Test
92+
@available(
93+
iOS 16.0, macOS 13.0,
94+
macCatalyst 13.0, tvOS 16.0,
95+
watchOS 9.0, visionOS 1.0, *
96+
)
8697
func unownedCapture() async throws {
8798
do { // explicit
8899
let object: Object = .init()
@@ -125,6 +136,11 @@ struct CapturedTests {
125136
}
126137

127138
@Test
139+
@available(
140+
iOS 16.0, macOS 13.0,
141+
macCatalyst 13.0, tvOS 16.0,
142+
watchOS 9.0, visionOS 1.0, *
143+
)
128144
func strongCapture() async throws {
129145
do { // explicit
130146
let object: Object = .init()

0 commit comments

Comments
 (0)