Documentation
¶
Index ¶
- Variables
- func Assert(t *testing.T, condition bool, messages ...string)
- func Eq(t *testing.T, expect, have any, messages ...string)
- func KO(t *testing.T, err error, messages ...string)
- func MatchString(t *testing.T, pattern, s string, messages ...string)
- func OK(t *testing.T, err error, messages ...string)
- func Panics(t *testing.T, f func())
- func PanicsEq(t *testing.T, exp string, f func())
- type LogAgg
Constants ¶
This section is empty.
Variables ¶
View Source
var TestHelper = (*testing.T).Helper
Functions ¶
func Assert ¶
Assert checks if condition is true. When not, messages are displayed. This is equivalent as Eq(t, true, condition, messages...).
func KO ¶
KO checks whether err is not nil.
Reverse of OK, and also, well, you know 💥🥊.
This could be replaced with using Eq, but since checking the error in Go is done lots, it is nicer to read in tests.
func MatchString ¶
MatchString tests whether the string s matches the regular expression pattern.
Types ¶
type LogAgg ¶ added in v1.5.0
type LogAgg struct {
// contains filtered or unexported fields
}
LogAgg is a very basic log aggregation writer which can be used to find entries. This is really just useful for tests and also not really specific to logging.
Click to show internal directories.
Click to hide internal directories.