mirror of https://bitbucket.org/ausocean/av.git
30 lines
509 B
Go
30 lines
509 B
Go
package revid
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"bitbucket.org/ausocean/iot/pi/netsender"
|
|
)
|
|
|
|
func TestAudioInputStart(t *testing.T) {
|
|
var logger testLogger
|
|
ns, err := netsender.New(&logger, nil, nil, nil)
|
|
if err != nil {
|
|
t.Errorf("netsender.New failed with error %v", err)
|
|
}
|
|
|
|
var c Config
|
|
c.Logger = &logger
|
|
c.Input = Audio
|
|
|
|
rv, err := New(c, ns)
|
|
if err != nil {
|
|
t.Errorf("revid.New failed with error %v", err)
|
|
}
|
|
|
|
err = rv.Start()
|
|
if err != nil {
|
|
t.Errorf("revid.Start failed with error %v", err)
|
|
}
|
|
}
|