diff options
author | n-peugnet <n.peugnet@free.fr> | 2021-09-21 17:33:03 +0200 |
---|---|---|
committer | n-peugnet <n.peugnet@free.fr> | 2021-09-21 17:33:03 +0200 |
commit | 91bdaf7ffa76dee079a07fd54fcaf1d0f84428f0 (patch) | |
tree | 9f851e6d6d17785a74633ebad821bd21b105b462 /slice/slice_test.go | |
parent | c6d2be5823e643f1392a970daca3743fef00fde2 (diff) | |
download | dna-backup-91bdaf7ffa76dee079a07fd54fcaf1d0f84428f0.tar.gz dna-backup-91bdaf7ffa76dee079a07fd54fcaf1d0f84428f0.zip |
store recipes incrementally
Diffstat (limited to 'slice/slice_test.go')
-rw-r--r-- | slice/slice_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/slice/slice_test.go b/slice/slice_test.go index b73946e..f6aecbc 100644 --- a/slice/slice_test.go +++ b/slice/slice_test.go @@ -9,13 +9,13 @@ import ( func TestPatch(t *testing.T) { source := Slice{1, 2, 3, 4} target := Slice{2, 5, 3, 6, 4, 7, 8} - patch := DiffSlice(source, target) - testutils.AssertSame(t, []SliceDel{0}, patch.Del, "Patch del part") - testutils.AssertSame(t, []SliceIns{ + patch := Diff(source, target) + testutils.AssertSame(t, []Del{0}, patch.Del, "Patch del part") + testutils.AssertSame(t, []Ins{ {1, Slice{5}}, {3, Slice{6}}, {5, Slice{7, 8}}, }, patch.Ins, "Patch ins part") - actual := PatchSlice(source, patch) + actual := Patch(source, patch) testutils.AssertSame(t, target, actual, "Target obtained from patch application") } |