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

Test a deletion at the end.

This commit is contained in:
Rob Rix 2015-10-06 17:28:25 -04:00
parent d7db7415dc
commit 6e799e0b79

View File

@ -27,6 +27,10 @@ final class SESTests: XCTestCase {
assert(SES([ a, d, b, c ], [ a, b, c ]), ==, [ roll(a), delete(d), roll(b), roll(c) ])
}
func testDeletesAtEnd() {
assert(SES([ a, b, c, d ], [ a, b, c ]), ==, [ roll(a), roll(b), roll(c), delete(d) ])
}
func testSESOfLongerSequences() {
assert(SES([ a, b, c, a, b, b, a ], [ c, b, a, b, a, c ]), ==, [ Diff.Pure(.Replace(a, c)), roll(b), delete(c), roll(a), delete(b), roll(b), roll(a), insert(c) ])
}