adjust tests to match the new idea

This commit is contained in:
sean 2023-04-10 21:37:44 +02:00
parent 89156fba2c
commit b954aa6f3b
21 changed files with 71 additions and 71 deletions

4
testdata/day.go vendored
View File

@ -28,8 +28,8 @@ func main() {
ck(Friday, "Friday") ck(Friday, "Friday")
ck(Saturday, "Saturday") ck(Saturday, "Saturday")
ck(Sunday, "Sunday") ck(Sunday, "Sunday")
ck(-127, "Day(-127)") ck(-127, "")
ck(127, "Day(127)") ck(127, "")
ckDayString(Sunday, "Sunday") ckDayString(Sunday, "Sunday")
ckDayString(Sunday, "sunday") ckDayString(Sunday, "sunday")

10
testdata/gap.go vendored
View File

@ -22,19 +22,19 @@ const (
) )
func main() { func main() {
ck(0, "Gap(0)") ck(0, "")
ck(1, "Gap(1)") ck(1, "")
ck(Two, "Two") ck(Two, "Two")
ck(Three, "Three") ck(Three, "Three")
ck(4, "Gap(4)") ck(4, "")
ck(Five, "Five") ck(Five, "Five")
ck(Six, "Six") ck(Six, "Six")
ck(Seven, "Seven") ck(Seven, "Seven")
ck(Eight, "Eight") ck(Eight, "Eight")
ck(Nine, "Nine") ck(Nine, "Nine")
ck(10, "Gap(10)") ck(10, "")
ck(Eleven, "Eleven") ck(Eleven, "Eleven")
ck(12, "Gap(12)") ck(12, "")
} }
func ck(gap Gap, str string) { func ck(gap Gap, str string) {

4
testdata/num.go vendored
View File

@ -19,13 +19,13 @@ const (
) )
func main() { func main() {
ck(-3, "Num(-3)") ck(-3, "")
ck(m_2, "m_2") ck(m_2, "m_2")
ck(m_1, "m_1") ck(m_1, "m_1")
ck(m0, "m0") ck(m0, "m0")
ck(m1, "m1") ck(m1, "m1")
ck(m2, "m2") ck(m2, "m2")
ck(3, "Num(3)") ck(3, "")
} }
func ck(num Num, str string) { func ck(num Num, str string) {

2
testdata/number.go vendored
View File

@ -24,7 +24,7 @@ func main() {
ck(Two, "Two") ck(Two, "Two")
ck(Three, "Three") ck(Three, "Three")
ck(AnotherOne, "One") ck(AnotherOne, "One")
ck(127, "Number(127)") ck(127, "")
} }
func ck(num Number, str string) { func ck(num Number, str string) {

8
testdata/prime.go vendored
View File

@ -29,11 +29,11 @@ const (
) )
func main() { func main() {
ck(0, "Prime(0)") ck(0, "")
ck(1, "Prime(1)") ck(1, "")
ck(p2, "p2") ck(p2, "p2")
ck(p3, "p3") ck(p3, "p3")
ck(4, "Prime(4)") ck(4, "")
ck(p5, "p5") ck(p5, "p5")
ck(p7, "p7") ck(p7, "p7")
ck(p77, "p7") ck(p77, "p7")
@ -46,7 +46,7 @@ func main() {
ck(p37, "p37") ck(p37, "p37")
ck(p41, "p41") ck(p41, "p41")
ck(p43, "p43") ck(p43, "p43")
ck(44, "Prime(44)") ck(44, "")
} }
func ck(prime Prime, str string) { func ck(prime Prime, str string) {

View File

@ -18,25 +18,25 @@ const (
) )
func main() { func main() {
ck(1, "Thresholdeq(1)") ck(1, "")
ck(req1, "req1") ck(req1, "req1")
ck(3, "Thresholdeq(3)") ck(3, "")
ck(req2, "req2") ck(req2, "req2")
ck(5, "Thresholdeq(5)") ck(5, "")
ck(req3, "req3") ck(req3, "req3")
ck(7, "Thresholdeq(7)") ck(7, "")
ck(req4, "req4") ck(req4, "req4")
ck(9, "Thresholdeq(9)") ck(9, "")
ck(req5, "req5") ck(req5, "req5")
ck(11, "Thresholdeq(11)") ck(11, "")
ck(req6, "req6") ck(req6, "req6")
ck(13, "Thresholdeq(13)") ck(13, "")
ck(req7, "req7") ck(req7, "req7")
ck(15, "Thresholdeq(15)") ck(15, "")
ck(req8, "req8") ck(req8, "req8")
ck(17, "Thresholdeq(17)") ck(17, "")
ck(req9, "req9") ck(req9, "req9")
ck(19, "Thresholdeq(19)") ck(19, "")
ck(req10, "req10") ck(req10, "req10")
} }

View File

@ -19,27 +19,27 @@ const (
) )
func main() { func main() {
ck(1, "Thresholdgt(1)") ck(1, "")
ck(rgt1, "rgt1") ck(rgt1, "rgt1")
ck(3, "Thresholdgt(3)") ck(3, "")
ck(rgt2, "rgt2") ck(rgt2, "rgt2")
ck(5, "Thresholdgt(5)") ck(5, "")
ck(rgt3, "rgt3") ck(rgt3, "rgt3")
ck(7, "Thresholdgt(7)") ck(7, "")
ck(rgt4, "rgt4") ck(rgt4, "rgt4")
ck(9, "Thresholdgt(9)") ck(9, "")
ck(rgt5, "rgt5") ck(rgt5, "rgt5")
ck(11, "Thresholdgt(11)") ck(11, "")
ck(rgt6, "rgt6") ck(rgt6, "rgt6")
ck(13, "Thresholdgt(13)") ck(13, "")
ck(rgt7, "rgt7") ck(rgt7, "rgt7")
ck(15, "Thresholdgt(15)") ck(15, "")
ck(rgt8, "rgt8") ck(rgt8, "rgt8")
ck(17, "Thresholdgt(17)") ck(17, "")
ck(rgt9, "rgt9") ck(rgt9, "rgt9")
ck(19, "Thresholdgt(19)") ck(19, "")
ck(rgt10, "rgt10") ck(rgt10, "rgt10")
ck(21, "Thresholdgt(21)") ck(21, "")
ck(rgt11, "rgt11") ck(rgt11, "rgt11")
} }
@ -47,4 +47,4 @@ func ck(thresholdgt Thresholdgt, str string) {
if fmt.Sprint(thresholdgt) != str { if fmt.Sprint(thresholdgt) != str {
panic("thresholdgt.go: " + str) panic("thresholdgt.go: " + str)
} }
} }

View File

@ -17,23 +17,23 @@ const (
) )
func main() { func main() {
ck(1, "Thresholdlt(1)") ck(1, "")
ck(rlt1, "rlt1") ck(rlt1, "rlt1")
ck(3, "Thresholdlt(3)") ck(3, "")
ck(rlt2, "rlt2") ck(rlt2, "rlt2")
ck(5, "Thresholdlt(5)") ck(5, "")
ck(rlt3, "rlt3") ck(rlt3, "rlt3")
ck(7, "Thresholdlt(7)") ck(7, "")
ck(rlt4, "rlt4") ck(rlt4, "rlt4")
ck(9, "Thresholdlt(9)") ck(9, "")
ck(rlt5, "rlt5") ck(rlt5, "rlt5")
ck(11, "Thresholdlt(11)") ck(11, "")
ck(rlt6, "rlt6") ck(rlt6, "rlt6")
ck(13, "Thresholdlt(13)") ck(13, "")
ck(rlt7, "rlt7") ck(rlt7, "rlt7")
ck(15, "Thresholdlt(15)") ck(15, "")
ck(rlt8, "rlt8") ck(rlt8, "rlt8")
ck(17, "Thresholdlt(17)") ck(17, "")
ck(rlt9, "rlt9") ck(rlt9, "rlt9")
} }

View File

@ -14,8 +14,8 @@ func main() {
ck(Male, "M") ck(Male, "M")
ck(Female, "F") ck(Female, "F")
ck(unknown, "u") ck(unknown, "u")
ck(-127, "FirstCaseValue(-127)") ck(-127, "")
ck(127, "FirstCaseValue(127)") ck(127, "")
} }
func ck(value FirstCaseValue, str string) { func ck(value FirstCaseValue, str string) {

View File

@ -14,8 +14,8 @@ func main() {
ck(Male, "m") ck(Male, "m")
ck(Female, "f") ck(Female, "f")
ck(Unknown, "u") ck(Unknown, "u")
ck(-127, "FirstLowerCaseValue(-127)") ck(-127, "")
ck(127, "FirstLowerCaseValue(127)") ck(127, "")
} }
func ck(value FirstLowerCaseValue, str string) { func ck(value FirstLowerCaseValue, str string) {

View File

@ -14,8 +14,8 @@ func main() {
ck(male, "M") ck(male, "M")
ck(female, "F") ck(female, "F")
ck(unknown, "U") ck(unknown, "U")
ck(-127, "FirstUpperCaseValue(-127)") ck(-127, "")
ck(127, "FirstUpperCaseValue(127)") ck(127, "")
} }
func ck(value FirstUpperCaseValue, str string) { func ck(value FirstUpperCaseValue, str string) {

View File

@ -14,8 +14,8 @@ func main() {
ck(KebabCaseValueOne, "kebab-case-value-one") ck(KebabCaseValueOne, "kebab-case-value-one")
ck(KebabCaseValueTwo, "kebab-case-value-two") ck(KebabCaseValueTwo, "kebab-case-value-two")
ck(KebabCaseValueThree, "kebab-case-value-three") ck(KebabCaseValueThree, "kebab-case-value-three")
ck(-127, "KebabCaseValue(-127)") ck(-127, "")
ck(127, "KebabCaseValue(127)") ck(127, "")
} }
func ck(value KebabCaseValue, str string) { func ck(value KebabCaseValue, str string) {

View File

@ -14,8 +14,8 @@ func main() {
ck(KebabUpperCaseValueOne, "KEBAB-UPPER-CASE-VALUE-ONE") ck(KebabUpperCaseValueOne, "KEBAB-UPPER-CASE-VALUE-ONE")
ck(KebabUpperCaseValueTwo, "KEBAB-UPPER-CASE-VALUE-TWO") ck(KebabUpperCaseValueTwo, "KEBAB-UPPER-CASE-VALUE-TWO")
ck(KebabUpperCaseValueThree, "KEBAB-UPPER-CASE-VALUE-THREE") ck(KebabUpperCaseValueThree, "KEBAB-UPPER-CASE-VALUE-THREE")
ck(-127, "KebabUpperCaseValue(-127)") ck(-127, "")
ck(127, "KebabUpperCaseValue(127)") ck(127, "")
} }
func ck(value KebabUpperCaseValue, str string) { func ck(value KebabUpperCaseValue, str string) {

View File

@ -14,8 +14,8 @@ func main() {
ck(LowerCaseValueOne, "lowercasevalueone") ck(LowerCaseValueOne, "lowercasevalueone")
ck(LowerCaseValueTwo, "lowercasevaluetwo") ck(LowerCaseValueTwo, "lowercasevaluetwo")
ck(LowerCaseValueThree, "lowercasevaluethree") ck(LowerCaseValueThree, "lowercasevaluethree")
ck(-127, "LowerCaseValue(-127)") ck(-127, "")
ck(127, "LowerCaseValue(127)") ck(127, "")
} }
func ck(value LowerCaseValue, str string) { func ck(value LowerCaseValue, str string) {

View File

@ -14,8 +14,8 @@ func main() {
ck(SnakeCaseValueOne, "snake_case_value_one") ck(SnakeCaseValueOne, "snake_case_value_one")
ck(SnakeCaseValueTwo, "snake_case_value_two") ck(SnakeCaseValueTwo, "snake_case_value_two")
ck(SnakeCaseValueThree, "snake_case_value_three") ck(SnakeCaseValueThree, "snake_case_value_three")
ck(-127, "SnakeCaseValue(-127)") ck(-127, "")
ck(127, "SnakeCaseValue(127)") ck(127, "")
} }
func ck(value SnakeCaseValue, str string) { func ck(value SnakeCaseValue, str string) {

View File

@ -14,8 +14,8 @@ func main() {
ck(SnakeUpperCaseValueOne, "SNAKE_UPPER_CASE_VALUE_ONE") ck(SnakeUpperCaseValueOne, "SNAKE_UPPER_CASE_VALUE_ONE")
ck(SnakeUpperCaseValueTwo, "SNAKE_UPPER_CASE_VALUE_TWO") ck(SnakeUpperCaseValueTwo, "SNAKE_UPPER_CASE_VALUE_TWO")
ck(SnakeUpperCaseValueThree, "SNAKE_UPPER_CASE_VALUE_THREE") ck(SnakeUpperCaseValueThree, "SNAKE_UPPER_CASE_VALUE_THREE")
ck(-127, "SnakeUpperCaseValue(-127)") ck(-127, "")
ck(127, "SnakeUpperCaseValue(127)") ck(127, "")
} }
func ck(value SnakeUpperCaseValue, str string) { func ck(value SnakeUpperCaseValue, str string) {

View File

@ -14,8 +14,8 @@ func main() {
ck(titlecasevalueone, "Titlecasevalueone") ck(titlecasevalueone, "Titlecasevalueone")
ck(titlecasevaluetwo, "Titlecasevaluetwo") ck(titlecasevaluetwo, "Titlecasevaluetwo")
ck(titlecasevaluethree, "Titlecasevaluethree") ck(titlecasevaluethree, "Titlecasevaluethree")
ck(-127, "TitleCaseValue(-127)") ck(-127, "")
ck(127, "TitleCaseValue(127)") ck(127, "")
} }
func ck(value TitleCaseValue, str string) { func ck(value TitleCaseValue, str string) {

View File

@ -14,8 +14,8 @@ func main() {
ck(UpperCaseValueOne, "UPPERCASEVALUEONE") ck(UpperCaseValueOne, "UPPERCASEVALUEONE")
ck(UpperCaseValueTwo, "UPPERCASEVALUETWO") ck(UpperCaseValueTwo, "UPPERCASEVALUETWO")
ck(UpperCaseValueThree, "UPPERCASEVALUETHREE") ck(UpperCaseValueThree, "UPPERCASEVALUETHREE")
ck(-127, "UpperCaseValue(-127)") ck(-127, "")
ck(127, "UpperCaseValue(127)") ck(127, "")
} }
func ck(value UpperCaseValue, str string) { func ck(value UpperCaseValue, str string) {

View File

@ -14,8 +14,8 @@ func main() {
ck(WhitespaceSeparatedValueOne, "whitespace separated value one") ck(WhitespaceSeparatedValueOne, "whitespace separated value one")
ck(WhitespaceSeparatedValueTwo, "whitespace separated value two") ck(WhitespaceSeparatedValueTwo, "whitespace separated value two")
ck(WhitespaceSeparatedValueThree, "whitespace separated value three") ck(WhitespaceSeparatedValueThree, "whitespace separated value three")
ck(-127, "WhitespaceSeparatedValue(-127)") ck(-127, "")
ck(127, "WhitespaceSeparatedValue(127)") ck(127, "")
} }
func ck(value WhitespaceSeparatedValue, str string) { func ck(value WhitespaceSeparatedValue, str string) {

4
testdata/unum.go vendored
View File

@ -22,13 +22,13 @@ const (
) )
func main() { func main() {
ck(^Unum(0)-3, "Unum(252)") ck(^Unum(0)-3, "")
ck(m_2, "m_2") ck(m_2, "m_2")
ck(m_1, "m_1") ck(m_1, "m_1")
ck(m0, "m0") ck(m0, "m0")
ck(m1, "m1") ck(m1, "m1")
ck(m2, "m2") ck(m2, "m2")
ck(3, "Unum(3)") ck(3, "")
} }
func ck(unum Unum, str string) { func ck(unum Unum, str string) {

4
testdata/unum2.go vendored
View File

@ -20,8 +20,8 @@ func main() {
ck(Zero, "Zero") ck(Zero, "Zero")
ck(One, "One") ck(One, "One")
ck(Two, "Two") ck(Two, "Two")
ck(3, "Unum2(3)") ck(3, "")
ck(255, "Unum2(255)") ck(255, "")
} }
func ck(unum Unum2, str string) { func ck(unum Unum2, str string) {