Add tests for RuleTargetAxis.

This commit is contained in:
Anna Rose Wiggins 2025-07-10 16:46:01 -04:00
parent 8f3b8f4b47
commit 6646044d28
8 changed files with 164 additions and 9 deletions

View file

@ -26,3 +26,10 @@ type RuleTarget interface {
// for most implementations.
CreateEvent(int32, *string) *evdev.InputEvent
}
// RuleTargetDevice is an interface abstraction on top of evdev.InputDevice, implementing
// only the methods we need in this package. This is used for testing, and the
// RuleTargetDevice can be safely cast to an *evdev.InputDevice when necessary.
type RuleTargetDevice interface {
AbsInfos() (map[evdev.EvCode]evdev.AbsInfo, error)
}