Files
core/slices/diff_test.go
Ingo Oppermann 3ff5251eba Fix test
2023-07-04 12:29:45 +02:00

18 lines
321 B
Go

package slices
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestDiff(t *testing.T) {
a := []string{"c", "d", "e", "f"}
b := []string{"a", "b", "c", "d"}
added, removed := Diff(a, b)
require.ElementsMatch(t, []string{"e", "f"}, added)
require.ElementsMatch(t, []string{"a", "b"}, removed)
}