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)) }