Skip to content

Commit 9eb4de4

Browse files
committed
WIP
1 parent d3eccee commit 9eb4de4

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

Tests/Tests/ViewTypes/TabViewTests.swift

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
#if !os(visionOS)
22
import SwiftUI
33
import 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

0 commit comments

Comments
 (0)