Add tests for AxisToButton rule. (WIP)
This commit is contained in:
parent
47fac539da
commit
e93187b8a5
4 changed files with 76 additions and 14 deletions
15
internal/mappingrules/test_mocks.go
Normal file
15
internal/mappingrules/test_mocks.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package mappingrules
|
||||
|
||||
import (
|
||||
"github.com/holoplot/go-evdev"
|
||||
"github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
type InputDeviceMock struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
func (m *InputDeviceMock) AbsInfos() (map[evdev.EvCode]evdev.AbsInfo, error) {
|
||||
args := m.Called()
|
||||
return args.Get(0).(map[evdev.EvCode]evdev.AbsInfo), args.Error(1)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue