|
|
@ -5,6 +5,7 @@ import (
|
|
|
|
"testing"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TestChinaMobile 验证手机号码
|
|
|
|
func TestChinaMobile(t *testing.T) {
|
|
|
|
func TestChinaMobile(t *testing.T) {
|
|
|
|
for i := 1; i <= 1; i++ {
|
|
|
|
for i := 1; i <= 1; i++ {
|
|
|
|
for ii := 0; ii <= 9; ii++ {
|
|
|
|
for ii := 0; ii <= 9; ii++ {
|
|
|
@ -26,6 +27,7 @@ func BenchmarkChinaMobile(b *testing.B) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TestChinaMobileNumber 验证中国移动手机号码
|
|
|
|
func TestChinaMobileNumber(t *testing.T) {
|
|
|
|
func TestChinaMobileNumber(t *testing.T) {
|
|
|
|
for i := 1; i <= 1; i++ {
|
|
|
|
for i := 1; i <= 1; i++ {
|
|
|
|
for ii := 0; ii <= 9; ii++ {
|
|
|
|
for ii := 0; ii <= 9; ii++ {
|
|
|
@ -40,6 +42,7 @@ func TestChinaMobileNumber(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TestChinaUnicomNumber 验证中国联通手机号码
|
|
|
|
func TestChinaUnicomNumber(t *testing.T) {
|
|
|
|
func TestChinaUnicomNumber(t *testing.T) {
|
|
|
|
for i := 1; i <= 1; i++ {
|
|
|
|
for i := 1; i <= 1; i++ {
|
|
|
|
for ii := 0; ii <= 9; ii++ {
|
|
|
|
for ii := 0; ii <= 9; ii++ {
|
|
|
@ -54,6 +57,7 @@ func TestChinaUnicomNumber(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TestChinaTelecomNumber 验证中国电信手机号码
|
|
|
|
func TestChinaTelecomNumber(t *testing.T) {
|
|
|
|
func TestChinaTelecomNumber(t *testing.T) {
|
|
|
|
for i := 1; i <= 1; i++ {
|
|
|
|
for i := 1; i <= 1; i++ {
|
|
|
|
for ii := 0; ii <= 9; ii++ {
|
|
|
|
for ii := 0; ii <= 9; ii++ {
|
|
|
@ -68,6 +72,22 @@ func TestChinaTelecomNumber(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TestChinaBroadnetNumber 验证中国广电手机号码
|
|
|
|
|
|
|
|
func TestChinaBroadnetNumber(t *testing.T) {
|
|
|
|
|
|
|
|
for i := 1; i <= 1; i++ {
|
|
|
|
|
|
|
|
for ii := 0; ii <= 9; ii++ {
|
|
|
|
|
|
|
|
for iii := 0; iii <= 9; iii++ {
|
|
|
|
|
|
|
|
one := i
|
|
|
|
|
|
|
|
two := ii
|
|
|
|
|
|
|
|
three := iii
|
|
|
|
|
|
|
|
number := fmt.Sprintf("%d%d%d00138000", one, two, three)
|
|
|
|
|
|
|
|
t.Logf("[中国广电]%s 状态:%v", number, ChinaBroadnetNumber(number))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TestChinaVirtualNumber 验证虚拟运营商手机号码
|
|
|
|
func TestChinaVirtualNumber(t *testing.T) {
|
|
|
|
func TestChinaVirtualNumber(t *testing.T) {
|
|
|
|
for i := 1; i <= 1; i++ {
|
|
|
|
for i := 1; i <= 1; i++ {
|
|
|
|
for ii := 0; ii <= 9; ii++ {
|
|
|
|
for ii := 0; ii <= 9; ii++ {
|
|
|
|