Documentation ¶
Overview ¶
Package testing offers some handy methods to display check and cross symbols with colors in test logs.
Index ¶
- Variables
- func Check(t *testing.T, want, got interface{}, name string)
- func CheckErrors(t *testing.T, want *string, got error)
- func Desc(t *testing.T, format string, a ...interface{})
- func FatalUnless(t *testing.T, err error)
- func GetLogger(t *testing.T, tag string) log.Interface
- func Ko(t *testing.T, format string, a ...interface{})
- func NewResponseWriter() responseWriter
- func Ok(t *testing.T, tag string)
- type LogHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var Colors = [...]int{ log.DebugLevel: gray, log.InfoLevel: blue, log.WarnLevel: yellow, log.ErrorLevel: red, log.FatalLevel: red, }
Colors mapping.
View Source
var ErrBehavioural = pointer.String(string(errors.Behavioural))
View Source
var ErrOperational = pointer.String(string(errors.Operational))
View Source
var ErrStructural = pointer.String(string(errors.Structural))
View Source
var Strings = [...]string{ log.DebugLevel: "DEBUG", log.InfoLevel: "INFO", log.WarnLevel: "WARN", log.ErrorLevel: "ERROR", log.FatalLevel: "FATAL", }
Strings mapping.
Functions ¶
func CheckErrors ¶
Check errors verify if a given string corresponds to a known error
func FatalUnless ¶
func NewResponseWriter ¶
func NewResponseWriter() responseWriter
Types ¶
type LogHandler ¶
LogHandler implementation.
Click to show internal directories.
Click to hide internal directories.