mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-01 11:29:48 +08:00
38 lines
494 B
Go
38 lines
494 B
Go
|
package common
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestCloneStr2Str(t *testing.T) {
|
||
|
type args struct {
|
||
|
m Str2Str
|
||
|
}
|
||
|
tests := []struct {
|
||
|
name string
|
||
|
args args
|
||
|
}{
|
||
|
{
|
||
|
args: args{
|
||
|
m: nil,
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
args: args{
|
||
|
m: map[string]string{
|
||
|
"k1": "v1",
|
||
|
"k2": "v2",
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
for _, tt := range tests {
|
||
|
t.Run(tt.name, func(t *testing.T) {
|
||
|
got := CloneStr2Str(tt.args.m)
|
||
|
assert.True(t, got.Equal(tt.args.m))
|
||
|
})
|
||
|
}
|
||
|
}
|