File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Tests/OpenSwiftUICoreTests/View/Input Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ //
2
+ // ViewInputsTest.swift
3
+ // OpenSwiftUICoreTests
4
+
5
+ @_spi ( ForOpenSwiftUIOnly)
6
+ import OpenSwiftUICore
7
+ import Testing
8
+
9
+ @MainActor
10
+ struct ViewInputsTest {
11
+ @Test
12
+ func debugProperties( ) {
13
+ let graph = ViewGraph ( rootViewType: EmptyView . self)
14
+ graph. globalSubgraph. apply {
15
+ var inputs = _ViewInputs ( withoutGeometry: graph. graphInputs)
16
+
17
+ #expect( inputs. changedDebugProperties == . all)
18
+ inputs. changedDebugProperties = [ ]
19
+
20
+ inputs. transform = . init( value: . init( ) )
21
+ #expect( inputs. changedDebugProperties. contains ( . transform) )
22
+
23
+ inputs. size = . init( value: . zero)
24
+ #expect( inputs. changedDebugProperties. contains ( . size) )
25
+
26
+ inputs. environment = . init( value: . init( ) )
27
+ #expect( inputs. changedDebugProperties. contains ( . environment) )
28
+
29
+ inputs. viewPhase = . init( value: . invalid)
30
+ #expect( inputs. changedDebugProperties. contains ( . phase) )
31
+ }
32
+ }
33
+ }
You can’t perform that action at this time.
0 commit comments