mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
Test that recursively-copied diffs do not contain patches.
This commit is contained in:
parent
11ed1a855d
commit
d5bf556cac
@ -14,6 +14,12 @@ final class DiffTests: XCTestCase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func testRecursivelyCopiedDiffsHaveNoPatches() {
|
||||||
|
property("recursively copying a term into a diff produces no patches") <- forAll { (term: RangedTerm) in
|
||||||
|
Free.sum(const(1))(Free<Term.Leaf, Term.Annotation, Patch<Term>>(term.term)) == 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func testInequalTermsProduceNonIdentityDiffs() {
|
func testInequalTermsProduceNonIdentityDiffs() {
|
||||||
property("inequal terms produce non-identity diffs") <- forAll { (diff: RangedDiff) in
|
property("inequal terms produce non-identity diffs") <- forAll { (diff: RangedDiff) in
|
||||||
(!Term.equals(annotation: const(true), leaf: ==)(diff.a.term, diff.b.term)) ==> Diff.sum(const(1))(diff.diff) > 0
|
(!Term.equals(annotation: const(true), leaf: ==)(diff.a.term, diff.b.term)) ==> Diff.sum(const(1))(diff.diff) > 0
|
||||||
|
Loading…
Reference in New Issue
Block a user