refresh neither leaks wraps, allows 2 of the same at once, nor closes raws

This commit is contained in:
bel
2023-03-25 10:50:39 -06:00
parent 97cc3ae151
commit ae1e32391c
18 changed files with 94 additions and 64 deletions

View File

@@ -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)}
}