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())
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 ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.