1
0
Fork 0
mirror of https://github.com/fluffle/goirc synced 2025-05-16 20:43:20 +00:00

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

View file

@ -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:<line no>: <level> <log message>