mirror of https://bitbucket.org/ausocean/av.git
revid: added test for newMultiSender
This commit is contained in:
parent
3761b55f87
commit
e7e3b5007b
|
@ -249,3 +249,19 @@ func TestMtsSenderDiscontinuity(t *testing.T) {
|
|||
t.Fatalf("Did not get discontinuity indicator for PAT")
|
||||
}
|
||||
}
|
||||
|
||||
// TestNewMultiSender checks that newMultiSender performs as expected when an
|
||||
// active function is not provided, and when an active function is provided.
|
||||
func TestNewMultiSender(t *testing.T) {
|
||||
// First test without giving an 'active' function.
|
||||
_, err := newMultiSender(nil, false, nil)
|
||||
if err == nil {
|
||||
t.Error("did not get expected error on creation of multiSender without active function")
|
||||
}
|
||||
|
||||
// Now test with providing an active function
|
||||
_, err = newMultiSender(nil, false, func() bool { return true })
|
||||
if err != nil {
|
||||
t.Errorf("did not expect to get error on creation of multiSender with active func provided, err: %v", err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue