Files
mayhem-party/src/device/output/key/char_test.go
2023-03-24 13:49:12 -06:00

25 lines
403 B
Go

package key
import "testing"
func TestFromChar(t *testing.T) {
if got := FromChar('1'); got != N1 {
t.Error(got)
}
if got := FromChar('a'); got != A {
t.Error(got)
}
if got := FromChar('A'); got != A {
t.Error(got)
}
if got := FromChar(byte(0)); got != Undef {
t.Error(got)
}
if got := ToChar(A); got != 'a' {
t.Error(got)
}
if got := ToChar(-1); got != '?' {
t.Error(got)
}
}