milvus/internal/common/string_list_test.go
Jiquan Long a5e2d6b6fb
Refactor RootCoord (#18930)
Signed-off-by: longjiquan <jiquan.long@zilliz.com>
Co-authored-by: xaxys <tpnnghd@163.com>

Signed-off-by: longjiquan <jiquan.long@zilliz.com>
Co-authored-by: xaxys <tpnnghd@163.com>
2022-09-05 13:29:11 +08:00

40 lines
533 B
Go

package common
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestCloneStringList(t *testing.T) {
type args struct {
l StringList
}
tests := []struct {
name string
args args
}{
{
args: args{
l: nil,
},
},
{
args: args{
l: []string{"s1", "s2"},
},
},
{
args: args{
l: []string{"dup", "dup", "dup"},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := CloneStringList(tt.args.l)
assert.True(t, got.Equal(tt.args.l))
})
}
}