mayhem-party/src/device/output/key/char_test.go

25 lines
399 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('!'); got != Undef {
t.Error(got)
}
if got := ToChar(A); got != 'a' {
t.Error(got)
}
if got := ToChar(-1); got != '?' {
t.Error(got)
}
}