From ebc34cdce516aa12053c47e18d4b50c2d4daa6d2 Mon Sep 17 00:00:00 2001 From: Alex Bramley Date: Sat, 22 Oct 2011 16:40:47 +0100 Subject: [PATCH] Hmm, slice out of range error, wtf. --- logging/mock.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/logging/mock.go b/logging/mock.go index 0021d56..b64f63a 100644 --- a/logging/mock.go +++ b/logging/mock.go @@ -57,9 +57,9 @@ func (m writerMap) CheckWrittenAtLevel(t *testing.T, lv LogLevel, exp string) { } else { w = m[lv] } - if len(w.written) == 0 { - t.Errorf("No bytes logged at level %s, expected:", LogString(lv)) - t.Errorf("\t%s", exp) + if len(w.written) < 32 { + t.Errorf("Not enough bytes logged at level %s:", LogString(lv)) + t.Errorf("\tgot: %s", string(w.written)) } // 32 bytes covers the date, time and filename up to the colon in // 2011/10/22 10:22:57 log_test.go::