protocol/rtp/client.go: removed dummyLogger as not required anymore.

This commit is contained in:
Saxon 2019-05-08 16:57:58 +09:30
parent 534a0bcecb
commit 3692ba772d
1 changed files with 0 additions and 30 deletions

View File

@ -34,38 +34,8 @@ import (
"io" "io"
"net" "net"
"testing" "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 // TestReceive checks that the Client can correctly receive RTP packets and
// perform a specificed operation on the packets before storing in the ringBuffer. // perform a specificed operation on the packets before storing in the ringBuffer.
func TestReceive(t *testing.T) { func TestReceive(t *testing.T) {