From 4e8488989166f42b70f6e56bcde358edc17cfc9f Mon Sep 17 00:00:00 2001 From: Martin/Geno Date: Thu, 28 Feb 2019 17:26:55 +0100 Subject: [PATCH] fix tests --- data/socket_msg.go | 2 +- data/socket_msg_test.go | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/data/socket_msg.go b/data/socket_msg.go index 3fc8d9f..2f94c39 100644 --- a/data/socket_msg.go +++ b/data/socket_msg.go @@ -24,7 +24,7 @@ const ( func (a SocketMSGType) Is(b SocketMSGType) bool { if DEBUG { - log.Debugf("SocketType: %x & %x = %x -> %b", a, b, (a & b), (a&b) > 0) + log.Debugf("SocketType: %x & %x = %x -> %t", a, b, (a & b), (a&b) > 0) } return (a & b) > 0 } diff --git a/data/socket_msg_test.go b/data/socket_msg_test.go index 12c4136..9cf4682 100644 --- a/data/socket_msg_test.go +++ b/data/socket_msg_test.go @@ -2,13 +2,20 @@ package data import ( "encoding/hex" - "log" "testing" "time" "github.com/stretchr/testify/assert" + + "github.com/bdlm/log" + "github.com/bdlm/std/logger" ) +func init() { + DEBUG = true + log.SetLevel(logger.Debug) +} + func TestMsgIsTypes(t *testing.T) { assert := assert.New(t) types := SocketMSGType(5)