File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Tests/OpenAttributeGraphCompatibilityTests/Attribute/Indirect Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,24 @@ struct IndirectAttributeCompatibilityTests {
1212 func basic( ) {
1313 let source = Attribute ( value: 0 )
1414 let indirect = IndirectAttribute ( source: source)
15+ #expect( indirect. attribute. identifier == indirect. identifier)
1516 #expect( indirect. identifier != source. identifier)
1617 #expect( indirect. source. identifier == source. identifier)
1718 #expect( indirect. dependency == . init( rawValue: 0 ) )
1819 }
20+
21+ @Test
22+ func resetSource( ) {
23+ let source1 = Attribute ( value: 0 )
24+ let indirect = IndirectAttribute ( source: source1)
25+ #expect( indirect. source. identifier == source1. identifier)
26+
27+ let source2 = Attribute ( value: 0 )
28+ indirect . source = source2
29+ #expect( indirect. source. identifier == source2. identifier)
30+
31+ indirect . resetSource( )
32+ #expect( indirect. source. identifier == source1. identifier)
33+ }
1934}
2035#endif
You can’t perform that action at this time.
0 commit comments