1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 17:04:47 +03:00

Add a refined diff fixture.

This commit is contained in:
Rob Rix 2015-11-05 12:01:47 -05:00
parent 28437e013f
commit 5a49baa039

View File

@ -84,6 +84,17 @@ private let diff: Free<String, Int, Patch<Cofree<String, Int>>> = Free.Roll(0, .
Free.Roll(1, .Leaf("a string")),
Free.Pure(Patch.Replace(leafA, leafB)),
]))
// fine-grained diff of same
private let refined = Free.Roll(2, .Indexed([
Free.Pure(Patch.Replace(Cofree(1, .Leaf("a")), Cofree(2, .Leaf("b")))),
Free.Roll(4, .Leaf(" ")),
Free.Roll(5, .Leaf("s")),
Free.Roll(6, .Leaf("t")),
Free.Roll(7, .Leaf("r")),
Free.Roll(8, .Leaf("i")),
Free.Roll(9, .Leaf("n")),
Free.Roll(10, .Leaf("g")),
]))
import Assertions