mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 19:08:30 +08:00
36 lines
495 B
Go
36 lines
495 B
Go
|
package metastore
|
||
|
|
||
|
import "testing"
|
||
|
|
||
|
func TestAlterType_String(t *testing.T) {
|
||
|
tests := []struct {
|
||
|
name string
|
||
|
t AlterType
|
||
|
want string
|
||
|
}{
|
||
|
{
|
||
|
t: ADD,
|
||
|
want: "ADD",
|
||
|
},
|
||
|
{
|
||
|
t: DELETE,
|
||
|
want: "DELETE",
|
||
|
},
|
||
|
{
|
||
|
t: MODIFY,
|
||
|
want: "MODIFY",
|
||
|
},
|
||
|
{
|
||
|
t: -1,
|
||
|
want: "",
|
||
|
},
|
||
|
}
|
||
|
for _, tt := range tests {
|
||
|
t.Run(tt.name, func(t *testing.T) {
|
||
|
if got := tt.t.String(); got != tt.want {
|
||
|
t.Errorf("String() = %v, want %v", got, tt.want)
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
}
|