1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 17:59:10 +03:00

Port insertion/deletion in the middle.

This commit is contained in:
Rob Rix 2015-10-06 13:25:56 -04:00
parent 9761ba3d98
commit 69d42e121c

View File

@ -20,11 +20,11 @@ final class DiffTests: XCTestCase {
}
func testSESCanInsertInMiddle() {
XCTAssertEqual(Diff.diff([ a, b, c ], [ a, d, b, c ]), [ Diff(a), Diff.Insert(d), Diff(b), Diff(c) ])
assert(SES([ a, b, c ], [ a, d, b, c ]), ==, [ roll(a), insert(d), roll(b), roll(c) ])
}
func testSESCanDeleteInMiddle() {
XCTAssertEqual(Diff.diff([ a, d, b, c ], [ a, b, c ]), [ Diff(a), Diff.Delete(d), Diff(b), Diff(c) ])
assert(SES([ a, d, b, c ], [ a, b, c ]), ==, [ roll(a), delete(d), roll(b), roll(c) ])
}
func testSESOfLongerSequences() {