micro-account/pkg/common/utils/utils_test.go
2025-02-20 16:18:23 +08:00

67 lines
1.3 KiB
Go

package utils
import "testing"
func Test_hasEnglish(t *testing.T) {
type args struct {
s string
}
tests := []struct {
name string
args args
want bool
}{
{args: args{s: "阿丽米罕·色依提"}, want: false},
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := HasEnglish(tt.args.s); got != tt.want {
t.Errorf("hasEnglish() = %v, want %v", got, tt.want)
}
})
}
}
func Test_hasEnglishAndChinese(t *testing.T) {
type args struct {
s string
}
tests := []struct {
name string
args args
want bool
}{
{args: args{s: "阿丽米罕·色依提"}, want: false},
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := HasEnglishAndChinese(tt.args.s); got != tt.want {
t.Errorf("hasEnglishAndChinese() = %v, want %v", got, tt.want)
}
})
}
}
func Test_hasEnglishAndChinese1(t *testing.T) {
type args struct {
s string
}
tests := []struct {
name string
args args
want bool
}{
{args: args{s: "阿丽米罕·色依提"}, want: false},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := HasEnglishAndChinese(tt.args.s); got != tt.want {
t.Errorf("hasEnglishAndChinese() = %v, want %v", got, tt.want)
}
})
}
}