Make ffmpeg skills compareable

This commit is contained in:
Ingo Oppermann
2023-07-06 10:27:56 +02:00
parent 604893f8bb
commit 6c2e8b0ec3
11 changed files with 489 additions and 77 deletions

View File

@@ -6,12 +6,22 @@ import (
"github.com/stretchr/testify/require"
)
func TestDiff(t *testing.T) {
func TestDiffComparable(t *testing.T) {
a := []string{"c", "d", "e", "f"}
b := []string{"a", "b", "c", "d"}
b := []string{"a", "a", "b", "c", "d"}
added, removed := Diff(a, b)
added, removed := DiffComparable(a, b)
require.ElementsMatch(t, []string{"e", "f"}, added)
require.ElementsMatch(t, []string{"a", "b"}, removed)
require.ElementsMatch(t, []string{"a", "a", "b"}, removed)
}
func TestDiffEqualer(t *testing.T) {
a := []String{"c", "d", "e", "f"}
b := []String{"a", "a", "b", "c", "d"}
added, removed := DiffComparable(a, b)
require.ElementsMatch(t, []String{"e", "f"}, added)
require.ElementsMatch(t, []String{"a", "a", "b"}, removed)
}