1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00

Extract an inner leaf.

This commit is contained in:
Rob Rix 2015-11-05 11:13:50 -05:00
parent 3e0b3797d2
commit d37f9bb355

View File

@ -27,11 +27,12 @@ final class LocationTests: XCTestCase {
private let leaf = Cofree(1, .Leaf("a string")) private let leaf = Cofree(1, .Leaf("a string"))
private let innerLeaf = Cofree(4, .Leaf("a nested string"))
private let term: Cofree<String, Int> = Cofree(0, .Indexed([ private let term: Cofree<String, Int> = Cofree(0, .Indexed([
leaf, leaf,
Cofree(2, .Leaf("b string")), Cofree(2, .Leaf("b string")),
Cofree(3, .Keyed([ Cofree(3, .Keyed([
"a": Cofree(4, .Leaf("a nested string")), "a": innerLeaf,
"b": Cofree(5, .Leaf("b nested string")), "b": Cofree(5, .Leaf("b nested string")),
])), ])),
])) ]))