mirror of
https://github.com/datarhei/core.git
synced 2025-10-06 00:17:07 +08:00
Make ffmpeg skills compareable
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user