1
1
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:
Rob Rix 2015-10-22 18:51:14 -04:00
parent 1ee9663e6e
commit 6cca28582d

View File

@ -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"))