mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-28 03:10:24 -04:00
test(tracker): fix FuzzModel: NullContext implements MIDIContext
This commit is contained in:
parent
f8f0e11b76
commit
cd88ea0680
@ -21,6 +21,12 @@ func (NullContext) BPM() (bpm float64, ok bool) {
|
|||||||
return 0, false
|
return 0, false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (NullContext) ListInputDevices() func(yield func(tracker.MIDIDevice) bool) {
|
||||||
|
return func(yield func(tracker.MIDIDevice) bool) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (NullContext) Close() {}
|
||||||
|
|
||||||
type modelFuzzState struct {
|
type modelFuzzState struct {
|
||||||
model *tracker.Model
|
model *tracker.Model
|
||||||
clipboard []byte
|
clipboard []byte
|
||||||
@ -253,7 +259,7 @@ func FuzzModel(f *testing.F) {
|
|||||||
f.Fuzz(func(t *testing.T, slice []byte) {
|
f.Fuzz(func(t *testing.T, slice []byte) {
|
||||||
reader := bytes.NewReader(slice)
|
reader := bytes.NewReader(slice)
|
||||||
synther := vm.GoSynther{}
|
synther := vm.GoSynther{}
|
||||||
model, player := tracker.NewModelPlayer(synther, "")
|
model, player := tracker.NewModelPlayer(synther, NullContext{}, "")
|
||||||
buf := make([][2]float32, 2048)
|
buf := make([][2]float32, 2048)
|
||||||
closeChan := make(chan struct{})
|
closeChan := make(chan struct{})
|
||||||
go func() {
|
go func() {
|
||||||
|
Loading…
Reference in New Issue
Block a user