mirror of
https://github.com/github/semantic.git
synced 2024-11-25 11:04:00 +03:00
Add a convenience to copy terms into diffs.
This commit is contained in:
parent
1ee9663e6e
commit
6cca28582d
@ -43,6 +43,10 @@ final class SESTests: XCTestCase {
|
|||||||
private typealias Term = Cofree<String, ()>
|
private typealias Term = Cofree<String, ()>
|
||||||
private typealias Diff = Free<String, (), Patch<Term>>
|
private typealias Diff = Free<String, (), Patch<Term>>
|
||||||
|
|
||||||
|
private func copy(term: Term) -> Diff {
|
||||||
|
return hylo(Diff.Introduce(()), Term.unwrap)(term)
|
||||||
|
}
|
||||||
|
|
||||||
private let a = Term((), .Leaf("a"))
|
private let a = Term((), .Leaf("a"))
|
||||||
private let b = Term((), .Leaf("b"))
|
private let b = Term((), .Leaf("b"))
|
||||||
private let c = Term((), .Leaf("c"))
|
private let c = Term((), .Leaf("c"))
|
||||||
|
Loading…
Reference in New Issue
Block a user