(t *testing.T)
| 229 | } |
| 230 | |
| 231 | func TestValidatePhone(t *testing.T) { |
| 232 | tests := []struct { |
| 233 | phone string |
| 234 | want bool |
| 235 | }{ |
| 236 | { |
| 237 | phone: "1234567890", |
| 238 | want: false, |
| 239 | }, |
| 240 | { |
| 241 | phone: "+8615655556666", |
| 242 | want: true, |
| 243 | }, |
| 244 | } |
| 245 | |
| 246 | for _, test := range tests { |
| 247 | got := ValidatePhone(test.phone) |
| 248 | isValid := got == nil |
| 249 | if isValid != test.want { |
| 250 | t.Errorf("validatePhone %s, err %v", test.phone, got) |
| 251 | } |
| 252 | } |
| 253 | } |
nothing calls this directly
no test coverage detected