From 3a4922b5d747d54c9cb62833c9d69acb96b072f6 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 7 Feb 2016 10:55:13 +0100 Subject: Add tests for long name creation and renaming (currently failing, obviously) --- internal/toggledlog/log.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/toggledlog') diff --git a/internal/toggledlog/log.go b/internal/toggledlog/log.go index 4a2ad03..5e5191a 100644 --- a/internal/toggledlog/log.go +++ b/internal/toggledlog/log.go @@ -25,7 +25,7 @@ type toggledLogger struct { // Enable or disable output Enabled bool // Panic after logging a message, useful in regression tests - PanicAfter bool + Wpanic bool *log.Logger } @@ -34,8 +34,8 @@ func (l *toggledLogger) Printf(format string, v ...interface{}) { return } l.Logger.Printf(format, v...) - if l.PanicAfter { - panic("PanicAfter: " + fmt.Sprintf(format, v...)) + if l.Wpanic { + panic("-wpanic turns warning into panic: " + fmt.Sprintf(format, v...)) } } func (l *toggledLogger) Println(v ...interface{}) { @@ -43,8 +43,8 @@ func (l *toggledLogger) Println(v ...interface{}) { return } l.Logger.Println(v...) - if l.PanicAfter { - panic("PanicAfter: " + fmt.Sprintln(v...)) + if l.Wpanic { + panic("-wpanic turns warning into panic: " + fmt.Sprintln(v...)) } } -- cgit v1.2.3