Move initialization code closer to the appropriate structs. (#17)
Reviewed-on: #17 Co-authored-by: Anna Rose Wiggins <annabunches@gmail.com> Co-committed-by: Anna Rose Wiggins <annabunches@gmail.com>
This commit is contained in:
parent
d9babf5dc0
commit
8d2b15a7c8
40 changed files with 1087 additions and 1109 deletions
|
@ -28,7 +28,11 @@ func (t *MappingRuleButtonTests) SetupTest() {
|
|||
func (t *MappingRuleButtonTests) TestMatchEvent() {
|
||||
inputButton, _ := NewRuleTargetButton("", t.inputDevice, evdev.BTN_TRIGGER, false)
|
||||
outputButton, _ := NewRuleTargetButton("", t.outputDevice, evdev.BTN_TRIGGER, false)
|
||||
testRule := NewMappingRuleButton(t.base, inputButton, outputButton)
|
||||
testRule := &MappingRuleButton{
|
||||
MappingRuleBase: t.base,
|
||||
Input: inputButton,
|
||||
Output: outputButton,
|
||||
}
|
||||
|
||||
// A matching input event should produce an output event
|
||||
expected := &evdev.InputEvent{
|
||||
|
@ -58,7 +62,11 @@ func (t *MappingRuleButtonTests) TestMatchEvent() {
|
|||
func (t *MappingRuleButtonTests) TestMatchEventInverted() {
|
||||
inputButton, _ := NewRuleTargetButton("", t.inputDevice, evdev.BTN_TRIGGER, true)
|
||||
outputButton, _ := NewRuleTargetButton("", t.outputDevice, evdev.BTN_TRIGGER, false)
|
||||
testRule := NewMappingRuleButton(t.base, inputButton, outputButton)
|
||||
testRule := &MappingRuleButton{
|
||||
MappingRuleBase: t.base,
|
||||
Input: inputButton,
|
||||
Output: outputButton,
|
||||
}
|
||||
|
||||
// A matching input event should produce an output event
|
||||
expected := &evdev.InputEvent{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue