mirror of https://bitbucket.org/ausocean/av.git
32 lines
616 B
Go
32 lines
616 B
Go
package revid
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"bitbucket.org/ausocean/av/container/mts"
|
|
"bitbucket.org/ausocean/av/container/mts/meta"
|
|
"bitbucket.org/ausocean/iot/pi/netsender"
|
|
)
|
|
|
|
func TestAudioInputNew(t *testing.T) {
|
|
mts.Meta = meta.New()
|
|
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)
|
|
} else if rv == nil {
|
|
t.Errorf("revid.New did not return a new revid")
|
|
}
|
|
|
|
rv.Stop()
|
|
}
|