File tree Expand file tree Collapse file tree 1 file changed +9
-18
lines changed Expand file tree Collapse file tree 1 file changed +9
-18
lines changed Original file line number Diff line number Diff line change 11#if !os(visionOS)
22import SwiftUI
33import SwiftUIIntrospect
4- import XCTest
4+ import Testing
55
66@MainActor
7- final class TabViewTests : XCTestCase {
7+ @Suite
8+ struct TabViewTests {
89 #if canImport(UIKit)
910 typealias PlatformTabView = UITabBarController
1011 #elseif canImport(AppKit)
1112 typealias PlatformTabView = NSTabView
1213 #endif
1314
14- func testTabView( ) throws {
15- guard #unavailable( macOS 15 ) else {
16- throw XCTSkip ( )
17- }
18-
19- XCTAssertViewIntrospection ( of: PlatformTabView . self) { spies in
20- let spy = spies [ 0 ]
21-
15+ @available ( macOS, introduced: 10.15 , obsoleted: 15 )
16+ @Test func introspect( ) async throws {
17+ try await introspection ( of: PlatformTabView . self) { spy in
2218 TabView {
2319 ZStack {
2420 Color . red
@@ -33,14 +29,9 @@ final class TabViewTests: XCTestCase {
3329 }
3430 }
3531
36- func testTabViewAsAncestor( ) throws {
37- guard #unavailable( macOS 15 ) else {
38- throw XCTSkip ( )
39- }
40-
41- XCTAssertViewIntrospection ( of: PlatformTabView . self) { spies in
42- let spy = spies [ 0 ]
43-
32+ @available ( macOS, introduced: 10.15 , obsoleted: 15 )
33+ @Test func introspectAsAncestor( ) async throws {
34+ try await introspection ( of: PlatformTabView . self) { spy in
4435 TabView {
4536 ZStack {
4637 Color . red
You can’t perform that action at this time.
0 commit comments