1 package stringslice 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/assert" 7 ) 8 9 func TestUnique(t *testing.T) { 10 assert.EqualValues(t, []string{"foo", "bar", "baz"}, Unique([]string{"foo", "foo", "bar", "baz", "bar"})) 11 } 12
View as plain text