mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
Test deep modifications replacing subtrees.
This commit is contained in:
parent
d52c5ddedd
commit
7276b42d6f
@ -55,6 +55,10 @@ final class LocationTests: XCTestCase {
|
||||
func testMultipleModificationsReplaceMultipleSubtrees() {
|
||||
assert(term.explore().down?.modify(const(leafB)).right?.modify(const(leafA)).up?.it, ==, Cofree(0, .Indexed([ leafB, leafA, keyed ])))
|
||||
}
|
||||
|
||||
func testDeepModificationsReplaceDeepSubtrees() {
|
||||
assert(term.explore().down?.modify(const(leafB)).right?.modify(const(leafA)).right?.down?.modify(const(innerLeafA)).right?.modify(const(innerLeafB)).root.it, ==, Cofree(0, .Indexed([ leafB, leafA, Cofree(3, .Keyed([ "a": innerLeafB, "b": innerLeafA ])) ])))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user