Documentation
¶
Index ¶
- func CheckComparableEqualIgnoreOrder[T comparable](result []T, resultName string, expected []T, t TestT)
- func CheckContains[T any](list []T, item T, t TestT)
- func CheckEqual(result interface{}, resultName string, expectedResult interface{}, t TestT)
- func CheckEqualEquateEmpty(result interface{}, resultName string, expectedResult interface{}, t TestT)
- func CheckEqualEquateEmptyIgnoreOrder(result interface{}, resultName string, expectedResult interface{}, t TestT)
- func CheckEqualErrs(result interface{}, resultName string, expectedResult interface{}, t TestT)
- func CheckErr(err error, message string, t TestT)
- func CheckErrs(errs []error, message string, t TestT)
- func CheckNotOk(ok bool, message string, t TestT)
- func CheckOk(ok bool, message string, t TestT)
- func ExpectErr(err error, message string, t TestT)
- func ExpectNil(value interface{}, t TestT)
- func ExpectNotNil(varName string, value interface{}, t TestT)
- func GenerateRandomLetterString(n int) string
- func Hash64(s string) uint64
- func MakeFooMaps(num int) map[int]*Foo
- func RandomDurationBetween(min time.Duration, max time.Duration) time.Duration
- func RandomNumber(max int) int
- func RandomNumberBetween(min int, max int) int
- type Bar
- type Foo
- type TestT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckComparableEqualIgnoreOrder ¶
func CheckComparableEqualIgnoreOrder[T comparable](result []T, resultName string, expected []T, t TestT)
func CheckContains ¶
func CheckEqual ¶
func CheckEqualEquateEmpty ¶
func CheckEqualEquateEmpty(result interface{}, resultName string, expectedResult interface{}, t TestT)
CheckEqualEquateEmpty will treat nil and empty values as equal for maps and slices
func CheckEqualEquateEmptyIgnoreOrder ¶
func CheckEqualEquateEmptyIgnoreOrder(result interface{}, resultName string, expectedResult interface{}, t TestT)
CheckEqualEquateEmptyIgnoreOrder will treat nil and empty values as equal for maps and slices
func CheckEqualErrs ¶
func CheckNotOk ¶
func ExpectNil ¶
func ExpectNil(value interface{}, t TestT)
ExpectNil will fail a test if a value is not nil
func ExpectNotNil ¶
ExpectNotNil will fail a test if a value is nil
func MakeFooMaps ¶
func RandomDurationBetween ¶
RandomDurationBetween returns a random duration between min/max duration. If min > max, then max is returned.
func RandomNumber ¶
func RandomNumberBetween ¶
RandomNumberBetween returns a random number between min and max. If Min > Max, then max is returned.
Types ¶
type Foo ¶
func MakeFoosOrderly ¶
Click to show internal directories.
Click to hide internal directories.