Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
muukii committed Feb 7, 2025
1 parent 74b724b commit 161b1bb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ final class COWTrackingProperyMacroTests: XCTestCase {
private var stored_0: Int = 18 {
_read {
(_backing_stored_0.value as? TrackingObject)?._tracking_context.path = _tracking_context.path?.pushed(.init("stored_0"))
_Tracking._tracking_modifyStorage {
$0.accessorRead(path: _tracking_context.path?.pushed(.init("stored_0")))
}
yield _backing_stored_0.value
}
set {
(_backing_stored_0.value as? TrackingObject)?._tracking_context.path = _tracking_context.path?.pushed(.init("stored_0"))
_Tracking._tracking_modifyStorage {
$0.accessorSet(path: _tracking_context.path?.pushed(.init("stored_0")))
}
Expand All @@ -55,6 +57,7 @@ final class COWTrackingProperyMacroTests: XCTestCase {
}
_modify {
(_backing_stored_0.value as? TrackingObject)?._tracking_context.path = _tracking_context.path?.pushed(.init("stored_0"))
_Tracking._tracking_modifyStorage {
$0.accessorModify(path: _tracking_context.path?.pushed(.init("stored_0")))
}
Expand Down
19 changes: 0 additions & 19 deletions Tests/StructTransactionMacroTests/TrackingMacroTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,6 @@ final class TrackingMacroTests: XCTestCase {
extension MyState: TrackingObject {
}
extension MyState {
func _tracking_propagate(path: PropertyPath) {
_tracking_context.path = path
(stored_0 as? TrackingObject)?._tracking_propagate(
path: path.pushed(.init("stored_0"))
)
(stored_1 as? TrackingObject)?._tracking_propagate(
path: path.pushed(.init("stored_1"))
)
(stored_2 as? TrackingObject)?._tracking_propagate(
path: path.pushed(.init("stored_2"))
)
(height as? TrackingObject)?._tracking_propagate(
path: path.pushed(.init("height"))
)
}
}
"""
}

Expand Down
6 changes: 3 additions & 3 deletions Tests/StructTransactionTests/GraphTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ struct GraphTests {
"""
1 {
1 {
1
2
1+
2+
}
2 {
1
1+
}
}
"""
Expand Down

0 comments on commit 161b1bb

Please sign in to comment.