@@ -6,38 +6,28 @@ import Testing
66@MainActor
77@Suite
88struct ToggleWithButtonStyleTests {
9- #if canImport(AppKit) && !targetEnvironment(macCatalyst)
109 typealias PlatformToggleWithButtonStyle = NSButton
11- #endif
1210
13- @available ( macOS 12 , * )
11+ @available ( macOS, introduced : 12 , obsoleted : 26 )
1412 @Test func introspect( ) async throws {
1513 let ( entity1, entity2, entity3) = try await introspection ( of: PlatformToggleWithButtonStyle . self) { spy1, spy2, spy3 in
1614 VStack {
1715 Toggle ( " " , isOn: . constant( true ) )
1816 . toggleStyle ( . button)
19- #if os(macOS)
20- . introspect( . toggle( style: . button) , on: . macOS( . v12, . v13, . v14, . v15, . v26) , customize: spy1)
21- #endif
22-
17+ . introspect ( . toggle( style: . button) , on: . macOS( . v12, . v13, . v14, . v15) , customize: spy1)
18+
2319 Toggle ( " " , isOn: . constant( false ) )
2420 . toggleStyle ( . button)
25- #if os(macOS)
26- . introspect( . toggle( style: . button) , on: . macOS( . v12, . v13, . v14, . v15, . v26) , customize: spy2)
27- #endif
28-
21+ . introspect ( . toggle( style: . button) , on: . macOS( . v12, . v13, . v14, . v15) , customize: spy2)
22+
2923 Toggle ( " " , isOn: . constant( true ) )
3024 . toggleStyle ( . button)
31- #if os(macOS)
32- . introspect( . toggle( style: . button) , on: . macOS( . v12, . v13, . v14, . v15, . v26) , customize: spy3)
33- #endif
25+ . introspect ( . toggle( style: . button) , on: . macOS( . v12, . v13, . v14, . v15) , customize: spy3)
3426 }
3527 }
36- #if canImport(AppKit) && !targetEnvironment(macCatalyst)
3728 #expect( entity1. state == . on)
3829 #expect( entity2. state == . off)
3930 #expect( entity3. state == . on)
40- #endif
4131 }
4232}
4333#endif
0 commit comments