wp-go/helper/strings/strings_test.go
2023-01-21 19:31:23 +08:00

24 lines
450 B
Go

package strings
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 := Join(tt.args.s...); gotStr != tt.wantStr {
t.Errorf("Join() = %v, want %v", gotStr, tt.wantStr)
}
})
}
}