2019-02-12 18:28:13 +03:00
|
|
|
package main
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
|
|
|
type WhitespaceSeparatedValue int
|
|
|
|
|
|
|
|
const (
|
|
|
|
WhitespaceSeparatedValueOne WhitespaceSeparatedValue = iota
|
|
|
|
WhitespaceSeparatedValueTwo
|
|
|
|
WhitespaceSeparatedValueThree
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
ck(WhitespaceSeparatedValueOne, "whitespace separated value one")
|
|
|
|
ck(WhitespaceSeparatedValueTwo, "whitespace separated value two")
|
|
|
|
ck(WhitespaceSeparatedValueThree, "whitespace separated value three")
|
2023-04-10 22:37:44 +03:00
|
|
|
ck(-127, "")
|
|
|
|
ck(127, "")
|
2019-02-12 18:28:13 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func ck(value WhitespaceSeparatedValue, str string) {
|
|
|
|
if fmt.Sprint(value) != str {
|
|
|
|
panic("transform_whitespace.go: " + str)
|
|
|
|
}
|
|
|
|
}
|