mirror of
https://github.com/github/semantic.git
synced 2024-11-29 02:44:36 +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 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 b = Term((), .Leaf("b"))
|
||||
private let c = Term((), .Leaf("c"))
|
||||
|
Loading…
Reference in New Issue
Block a user