diff --git a/platforms/audio/audio_adaptor.go b/platforms/audio/audio_adaptor.go index 4cec6785..2146516c 100644 --- a/platforms/audio/audio_adaptor.go +++ b/platforms/audio/audio_adaptor.go @@ -21,9 +21,9 @@ func (a *Adaptor) Name() string { return a.name } func (a *Adaptor) SetName(n string) { a.name = n } -func (a *Adaptor) Connect() []error { return nil } +func (a *Adaptor) Connect() error { return nil } -func (a *Adaptor) Finalize() []error { return nil } +func (a *Adaptor) Finalize() error { return nil } func (a *Adaptor) Sound(fileName string) []error { var errorsList []error diff --git a/platforms/audio/audio_adaptor_test.go b/platforms/audio/audio_adaptor_test.go index 9bac1604..00b97bec 100644 --- a/platforms/audio/audio_adaptor_test.go +++ b/platforms/audio/audio_adaptor_test.go @@ -14,8 +14,8 @@ var _ gobot.Adaptor = (*Adaptor)(nil) func TestAudioAdaptor(t *testing.T) { a := NewAdaptor() - gobottest.Assert(t, len(a.Connect()), 0) - gobottest.Assert(t, len(a.Finalize()), 0) + gobottest.Assert(t, a.Connect(), nil) + gobottest.Assert(t, a.Finalize(), nil) } func TestAudioAdaptorCommandsWav(t *testing.T) { diff --git a/platforms/audio/audio_driver.go b/platforms/audio/audio_driver.go index 6c5f138a..259aa23a 100644 --- a/platforms/audio/audio_driver.go +++ b/platforms/audio/audio_driver.go @@ -53,10 +53,10 @@ func (d *Driver) adaptor() *Adaptor { return d.Connection().(*Adaptor) } -func (d *Driver) Start() (err []error) { +func (d *Driver) Start() (err error) { return } -func (d *Driver) Halt() (err []error) { +func (d *Driver) Halt() (err error) { return } diff --git a/platforms/audio/audio_driver_test.go b/platforms/audio/audio_driver_test.go index 531b872e..d1ca964f 100644 --- a/platforms/audio/audio_driver_test.go +++ b/platforms/audio/audio_driver_test.go @@ -19,9 +19,9 @@ func TestAudioDriver(t *testing.T) { gobottest.Refute(t, d.Connection(), nil) - gobottest.Assert(t, len(d.Start()), 0) + gobottest.Assert(t, d.Start(), nil) - gobottest.Assert(t, len(d.Halt()), 0) + gobottest.Assert(t, d.Halt(), nil) } func TestAudioDriverSoundWithNoFilename(t *testing.T) {