File tree Expand file tree Collapse file tree 4 files changed +42
-13
lines changed
Sources/OpenSwiftUICore/Graph
Tests/OpenSwiftUICompatibilityTests/SwiftUICore Expand file tree Collapse file tree 4 files changed +42
-13
lines changed Original file line number Diff line number Diff line change @@ -371,7 +371,7 @@ extension GraphHost {
371371 style: _GraphMutation_Style = . deferred,
372372 mayDeferUpdate: Bool = true
373373 ) where T: GraphMutation {
374- preconditionFailure ( " TODO " )
374+ // preconditionFailure("TODO")
375375 }
376376
377377 package final func asyncTransaction(
Original file line number Diff line number Diff line change 11//
2- // EnvironmentValuesTest.swift
3- //
4- //
5- // Created by Kyle on 2023/11/21.
6- //
2+ // EnvironmentValuesTests.swift
3+ // OpenSwiftUICompatibilityTests
74
85import Testing
96
10- struct EnvironmentValuesTest {
7+ struct EnvironmentValuesTests {
118 struct BoolKey : EnvironmentKey {
129 fileprivate static var name : String { " EnvironmentPropertyKey<BoolKey> " }
1310
Original file line number Diff line number Diff line change 1+ //
2+ // StateTests.swift
3+ // OpenSwiftUICompatibilityTests
4+
5+ import Testing
6+
7+ #if canImport(Darwin)
8+ struct StateTests {
9+ @Test
10+ func appear( ) async throws {
11+ struct ContentView : View {
12+ var confirmation : Confirmation
13+
14+ @State private var toggle = false
15+
16+ var body : some View {
17+ AnyView ( EmptyView ( ) )
18+ . onAppear {
19+ toggle. toggle ( )
20+ if toggle {
21+ confirmation ( )
22+ }
23+ }
24+ }
25+ }
26+
27+ #if os(iOS)
28+ await confirmation { @MainActor confirmation in
29+ let vc = UIHostingController ( rootView: ContentView ( confirmation: confirmation) )
30+ vc. triggerLayout ( )
31+ workaroundIssue87 ( vc)
32+ }
33+ #endif
34+ }
35+
36+ // TODO: Add disappear support and test case
37+ }
38+ #endif
Original file line number Diff line number Diff line change @@ -8,12 +8,6 @@ import Testing
88struct AppearanceActionModifierTests {
99 @Test
1010 func appear( ) async throws {
11- guard #unavailable( iOS 18 ) else {
12- withKnownIssue {
13- Issue . record ( " Known crash issue on iOS 18 " )
14- }
15- return
16- }
1711 struct ContentView : View {
1812 var confirmation : Confirmation
1913
You can’t perform that action at this time.
0 commit comments