mirror of
https://github.com/github/semantic.git
synced 2025-01-02 04:10:29 +03:00
Test that comparisons are restricted by nil returns from recur
.
This commit is contained in:
parent
e0692770b3
commit
7a03f09fe9
@ -1,5 +1,13 @@
|
||||
final class AlgorithmTests: XCTestCase {
|
||||
|
||||
func testRestrictsComparisonsWhenRecurReturnsNil() {
|
||||
assert(Algorithm(a, b).evaluate(==, recur: const(nil)), ==, Diff.Roll([
|
||||
.Pure(.Insert(Term(1, .Leaf("c")))),
|
||||
.Pure(.Delete(Term(1, .Leaf("a")))),
|
||||
Diff(Term(2, .Leaf("b"))),
|
||||
.Pure(.Insert(Term(3, .Leaf("a")))),
|
||||
.Pure(.Delete(Term(3, .Leaf("c")))),
|
||||
]))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -12,4 +20,5 @@ private let b = Term(0, [ Term(1, .Leaf("c")), Term(2, .Leaf("b")), Term(3, .Lea
|
||||
|
||||
import Assertions
|
||||
@testable import Doubt
|
||||
import Prelude
|
||||
import XCTest
|
||||
|
Loading…
Reference in New Issue
Block a user