core: update Audio platform to simply return error
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
dfd822251e
commit
ec24ae58bc
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue