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