You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
390 B
21 lines
390 B
package Test
|
|
|
|
import (
|
|
"dsBaseRpc/Utils/IdCardUtil"
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func TestIdCard(t *testing.T) {
|
|
//待验证的身份证号
|
|
idCard:="222301197710110018"
|
|
//开始检查
|
|
isValid, birthday, xb := IdCardUtil.GetIdCardNoInfo(idCard)
|
|
if !isValid{
|
|
fmt.Println("身份证号不合法!")
|
|
} else {
|
|
// isMale:true---->男
|
|
fmt.Printf("birthday=%s, xb=%s \n", birthday, xb)
|
|
}
|
|
}
|