mirror of https://bitbucket.org/ausocean/av.git
protocol/rtp/client.go: removed dummyLogger as not required anymore.
This commit is contained in:
parent
534a0bcecb
commit
3692ba772d
|
@ -34,38 +34,8 @@ import (
|
|||
"io"
|
||||
"net"
|
||||
"testing"
|
||||
|
||||
"bitbucket.org/ausocean/utils/logger"
|
||||
)
|
||||
|
||||
// dummyLogger will allow logging to be done by the testing pkg.
|
||||
type dummyLogger testing.T
|
||||
|
||||
func (dl *dummyLogger) log(lvl int8, msg string, args ...interface{}) {
|
||||
var l string
|
||||
switch lvl {
|
||||
case logger.Warning:
|
||||
l = "warning"
|
||||
case logger.Debug:
|
||||
l = "debug"
|
||||
case logger.Info:
|
||||
l = "info"
|
||||
case logger.Error:
|
||||
l = "error"
|
||||
case logger.Fatal:
|
||||
l = "fatal"
|
||||
}
|
||||
msg = l + ": " + msg
|
||||
for i := 0; i < len(args); i++ {
|
||||
msg += " %v"
|
||||
}
|
||||
if len(args) == 0 {
|
||||
dl.Log(msg + "\n")
|
||||
return
|
||||
}
|
||||
dl.Logf(msg+"\n", args...)
|
||||
}
|
||||
|
||||
// TestReceive checks that the Client can correctly receive RTP packets and
|
||||
// perform a specificed operation on the packets before storing in the ringBuffer.
|
||||
func TestReceive(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue