wp-go/helper/strings_test.go

24 lines
455 B
Go
Raw Normal View History

2023-01-13 04:31:35 +00:00
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)
}
})
}
}