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.

30 lines
612 B

package regx
import (
"fmt"
"testing"
)
func TestRegx_IsLeapYear(t *testing.T) {
fmt.Println(regx.IsLeapYear(2020))
fmt.Println(regx.CheckBirthdayCode("20200231"))
//false 闰年2月只有29号
}
func TestRegx_GetZodiac(t *testing.T) {
fmt.Println(regx.GetZodiac(10, 31))
fmt.Println(regx.GetZodiac(8, 28))
fmt.Println(regx.GetZodiac(6, 18))
fmt.Println(regx.GetZodiac(2, 11))
}
func TestRegx_GetChineseZodiac(t *testing.T) {
fmt.Println(regx.GetChineseZodiac(2020))
fmt.Println(regx.GetChineseZodiac(2021))
fmt.Println(regx.GetChineseZodiac(2022))
fmt.Println(regx.GetChineseZodiac(2023))
}