Documentation ¶
Index ¶
- Variables
- func AssertCompareHelper(t testRunner, object any, option int, msg ...any)
- func AssertDirEmptyHelper(t testRunner, dir string) bool
- func AssertRegexpHelper(t testRunner, regex any, txt any, shouldMatch bool, msg ...any)
- func CompareTwoValuesInASlice(a reflect.Value, compareFunc func(a, b reflect.Value) bool) (ret bool)
- func CompletesIn(duration time.Duration, f func()) bool
- func DoesContain(object, element any) bool
- func Fail(t testRunner, message string, objects Objects, args ...any)
- func FailS(message string, objects Objects, args ...any) string
- func GetCurrentScriptDirectory() string
- func GetTest(t testRunner) *testing.T
- func HasEqualValues(expected any, actual any) bool
- func HasSameElements[T comparable](expected []T, actual []T) bool
- func IsEqual(expected any, actual any) bool
- func IsSubset[T comparable](t testRunner, list []T, subset []T) bool
- func ModifyWrappedText(text, wrappingString string, modifier func(wrappedText string) string) string
- type Object
- type Objects
Constants ¶
This section is empty.
Variables ¶
View Source
var DiffContextLines = 2
View Source
var LineNumbersEnabled = true
LineNumbersEnabled controls if line numbers should be printed in the fail printer.
Functions ¶
func AssertCompareHelper ¶
AssertCompareHelper option: 1 = increasing, 0 = equal, -1 = decreasing
func AssertDirEmptyHelper ¶
AssertDirEmptyHelper checks for io.EOF to determine if directory empty or not
func AssertRegexpHelper ¶
func CompareTwoValuesInASlice ¶
func CompareTwoValuesInASlice(a reflect.Value, compareFunc func(a, b reflect.Value) bool) (ret bool)
CompareTwoValuesInASlice is a helper function.
func CompletesIn ¶
CompletesIn returns if a function completes in a specific time.
func DoesContain ¶
DoesContain checks that ab objects contains an element.
func GetCurrentScriptDirectory ¶
func GetCurrentScriptDirectory() string
GetCurrentScriptDirectory returns the directory of the current Go file.
func HasEqualValues ¶
HasEqualValues checks if two objects have equal values.
func HasSameElements ¶
func HasSameElements[T comparable](expected []T, actual []T) bool
func IsSubset ¶
func IsSubset[T comparable](t testRunner, list []T, subset []T) bool
Types ¶
type Object ¶
func NewDiffObject ¶
type Objects ¶
type Objects []Object
func NewObjectsSingleNamed ¶
func NewObjectsSingleUnknown ¶
func NewObjectsUnknown ¶
Click to show internal directories.
Click to hide internal directories.