wp-go/helper/strings_test.go
2023-01-13 12:31:35 +08:00

24 lines
455 B
Go

package helper
import "testing"
func TestStrJoin(t *testing.T) {
type args struct {
s []string
}
tests := []struct {
name string
args args
wantStr string
}{
{name: "t1", args: args{s: []string{"a", "b", "c"}}, wantStr: "abc"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if gotStr := StrJoin(tt.args.s...); gotStr != tt.wantStr {
t.Errorf("StrJoin() = %v, want %v", gotStr, tt.wantStr)
}
})
}
}