package key

import "testing"

func TestFromChar(t *testing.T) {
	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)
	}
}
