2019-01-17 15:07:52 +03:00
|
|
|
package main
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
|
|
|
type TitleCaseValue int
|
|
|
|
|
|
|
|
const (
|
|
|
|
titlecasevalueone TitleCaseValue = iota
|
|
|
|
titlecasevaluetwo
|
|
|
|
titlecasevaluethree
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
ck(titlecasevalueone, "Titlecasevalueone")
|
|
|
|
ck(titlecasevaluetwo, "Titlecasevaluetwo")
|
|
|
|
ck(titlecasevaluethree, "Titlecasevaluethree")
|
2023-04-10 22:37:44 +03:00
|
|
|
ck(-127, "")
|
|
|
|
ck(127, "")
|
2019-01-17 15:07:52 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func ck(value TitleCaseValue, str string) {
|
|
|
|
if fmt.Sprint(value) != str {
|
|
|
|
panic("transform_title.go: " + str)
|
|
|
|
}
|
|
|
|
}
|