Skip to content

Commit 1f69700

Browse files
committed
Update
1 parent ec631f5 commit 1f69700

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Tests/StructTransactionTests/TransactionTests.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,20 @@ final class WritingStateTests: XCTestCase {
6666
$0.nested.name = "hey"
6767
}
6868

69+
XCTAssertEqual(r.modifiedIdentifiers, .init(["nested"]))
6970
XCTAssertEqual(myState.nested.name, "hey")
7071
}
7172

73+
func testModifyOverComputedProperty() {
74+
75+
var myState = MyState(name: "")
76+
77+
let r = myState.modify {
78+
$0.computed_setter = "A"
79+
}
80+
81+
XCTAssertEqual(r.modifiedIdentifiers, .init(["name"]))
82+
XCTAssertEqual(myState.name, "A")
83+
}
84+
7285
}

0 commit comments

Comments
 (0)