Hmm, slice out of range error, wtf.

This commit is contained in:
Alex Bramley 2011-10-22 16:40:47 +01:00
parent 4ee7aac968
commit ebc34cdce5
1 changed files with 3 additions and 3 deletions

View File

@ -57,9 +57,9 @@ func (m writerMap) CheckWrittenAtLevel(t *testing.T, lv LogLevel, exp string) {
} else { } else {
w = m[lv] w = m[lv]
} }
if len(w.written) == 0 { if len(w.written) < 32 {
t.Errorf("No bytes logged at level %s, expected:", LogString(lv)) t.Errorf("Not enough bytes logged at level %s:", LogString(lv))
t.Errorf("\t%s", exp) t.Errorf("\tgot: %s", string(w.written))
} }
// 32 bytes covers the date, time and filename up to the colon in // 32 bytes covers the date, time and filename up to the colon in
// 2011/10/22 10:22:57 log_test.go:<line no>: <level> <log message> // 2011/10/22 10:22:57 log_test.go:<line no>: <level> <log message>