File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed
Tests/OpenSwiftUI_SPITests/Shims Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ //
2
+ // CoreAnimationPrivateTests.swift
3
+ // OpenSwiftUI_SPITests
4
+
5
+ import OpenSwiftUI_SPI
6
+ import Testing
7
+
8
+ #if canImport(QuartzCore)
9
+ @MainActor
10
+ struct CoreAnimationPrivateTests {
11
+ @Test
12
+ func layer( ) {
13
+ let layer = CALayer ( )
14
+ #expect( layer. hasBeenCommitted == false )
15
+ layer. setAllowsEdgeAntialiasing ( true )
16
+ layer. setAllowsGroupOpacity ( true )
17
+ layer. setAllowsGroupBlending ( true )
18
+
19
+ layer. openSwiftUI_viewTestProperties = 42
20
+ #expect( layer. openSwiftUI_viewTestProperties == 42 )
21
+ }
22
+ }
23
+ #endif
Original file line number Diff line number Diff line change
1
+ //
2
+ // UIKitPrivateTests.swift
3
+ // OpenSwiftUI_SPITests
4
+
5
+ import OpenSwiftUI_SPI
6
+ import Testing
7
+
8
+ #if canImport(UIKit)
9
+ @MainActor
10
+ struct UIKitPrivateTests {
11
+ @Test
12
+ func application( ) {
13
+ let app = UIApplication . shared
14
+ let name = " ATest "
15
+ app. startedTest ( name)
16
+ app. finishedTest ( name)
17
+ app. failedTest ( name, withFailure: nil )
18
+ #expect( app. _launchTestName ( ) == nil )
19
+ }
20
+
21
+ @Test
22
+ func view( ) {
23
+ let view = UIView ( )
24
+ #expect( view. _shouldAnimateProperty ( withKey: " frame " ) == false )
25
+ #expect( view. _shouldAnimateProperty ( withKey: " alpha " ) == false )
26
+
27
+ view. _setFocusInteractionEnabled ( true )
28
+ }
29
+
30
+ @Test
31
+ func viewController( ) {
32
+ let controller = UIViewController ( )
33
+ #expect( controller. _canShowWhileLocked == true )
34
+ }
35
+ }
36
+ #endif
You can’t perform that action at this time.
0 commit comments