refresh neither leaks wraps, allows 2 of the same at once, nor closes raws
This commit is contained in:
@@ -2,6 +2,7 @@ package wrap
|
||||
|
||||
import (
|
||||
"mayhem-party/src/device/input/button"
|
||||
"mayhem-party/src/device/input/raw"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -10,12 +11,12 @@ func TestWrap(t *testing.T) {
|
||||
var _ Wrap = &Refresh{}
|
||||
var _ Wrap = &Buffered{}
|
||||
var _ Wrap = &Remap{}
|
||||
var _ Wrap = Protocol{}
|
||||
}
|
||||
|
||||
type dummyParser button.Button
|
||||
|
||||
func (d dummyParser) Close() {}
|
||||
func (d dummyParser) CloseWrap() raw.Raw { return nil }
|
||||
func (d dummyParser) Close() {}
|
||||
func (d dummyParser) Read() []button.Button {
|
||||
return []button.Button{button.Button(d)}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user