|
|
@@ -17,6 +17,18 @@ func TestAllBlank(t *testing.T) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+func TestHasBlank(t *testing.T) {
|
|
|
+ hasBlank := HasBlank("a", "", "b")
|
|
|
+ if !hasBlank {
|
|
|
+ t.Fatal("字符串包含空字符串检测失败")
|
|
|
+ }
|
|
|
+
|
|
|
+ hasBlank = HasBlank("a", "b", "c")
|
|
|
+ if hasBlank {
|
|
|
+ t.Fatal("字符串不包含空字符串但是检测失败")
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
func TestIsStringEmpty(t *testing.T) {
|
|
|
stringEmpty := IsStringEmpty("")
|
|
|
if !stringEmpty {
|