Documentation
¶
Index ¶
- func Condition(t TestingT, comp Comparison, msgAndArgs ...any)
- func Conditionf(t TestingT, comp Comparison, msg string, args ...any)
- func Contains(t TestingT, s any, contains any, msgAndArgs ...any)
- func Containsf(t TestingT, s any, contains any, msg string, args ...any)
- func DirExists(t TestingT, path string, msgAndArgs ...any)
- func DirExistsf(t TestingT, path string, msg string, args ...any)
- func ElementsMatch(t TestingT, listA any, listB any, msgAndArgs ...any)
- func ElementsMatchf(t TestingT, listA any, listB any, msg string, args ...any)
- func Empty(t TestingT, object any, msgAndArgs ...any)
- func Equal(t TestingT, expected any, actual any, msgAndArgs ...any)
- func EqualError(t TestingT, theError error, errString string, msgAndArgs ...any)
- func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...any)
- func EqualExportedValues(t TestingT, expected any, actual any, msgAndArgs ...any)
- func EqualExportedValuesf(t TestingT, expected any, actual any, msg string, args ...any)
- func EqualValues(t TestingT, expected any, actual any, msgAndArgs ...any)
- func EqualValuesf(t TestingT, expected any, actual any, msg string, args ...any)
- func Equalf(t TestingT, expected any, actual any, msg string, args ...any)
- func Error(t TestingT, err error, msgAndArgs ...any)
- func ErrorAs(t TestingT, err error, target any, msgAndArgs ...any)
- func ErrorAsf(t TestingT, err error, target any, msg string, args ...any)
- func ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...any)
- func ErrorContainsf(t TestingT, theError error, contains string, msg string, args ...any)
- func ErrorIs(t TestingT, err error, target error, msgAndArgs ...any)
- func ErrorIsf(t TestingT, err error, target error, msg string, args ...any)
- func Errorf(t TestingT, err error, msg string, args ...any)
- func Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, ...)
- func EventuallyWithT(t TestingT, condition func(collect TestingT), waitFor time.Duration, ...)
- func EventuallyWithTf(t TestingT, condition func(collect TestingT), waitFor time.Duration, ...)
- func Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, ...)
- func Exactly(t TestingT, expected any, actual any, msgAndArgs ...any)
- func Exactlyf(t TestingT, expected any, actual any, msg string, args ...any)
- func Fail(t TestingT, failureMessage string, msgAndArgs ...any)
- func FailNow(t TestingT, failureMessage string, msgAndArgs ...any)
- func FailNowf(t TestingT, failureMessage string, msg string, args ...any)
- func Failf(t TestingT, failureMessage string, msg string, args ...any)
- func False(t TestingT, value bool, msgAndArgs ...any)
- func Falsef(t TestingT, value bool, msg string, args ...any)
- func FileExists(t TestingT, path string, msgAndArgs ...any)
- func Greater[T cmp.Ordered](t TestingT, e1 T, e2 T, msgAndArgs ...any)
- func GreaterOrEqual[T cmp.Ordered](t TestingT, e1 T, e2 T, msgAndArgs ...any)
- func GreaterOrEqualf[T cmp.Ordered](t TestingT, e1 T, e2 T, msg string, args ...any)
- func Greaterf[T cmp.Ordered](t TestingT, e1 T, e2 T, msg string, args ...any)
- func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method string, url string, ...)
- func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, ...)
- func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method string, url string, ...)
- func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, ...)
- func HTTPError(t TestingT, handler http.HandlerFunc, method string, url string, ...)
- func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, ...)
- func HTTPRedirect(t TestingT, handler http.HandlerFunc, method string, url string, ...)
- func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, ...)
- func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method string, url string, ...)
- func HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url string, ...)
- func HTTPSuccess(t TestingT, handler http.HandlerFunc, method string, url string, ...)
- func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, ...)
- func Implements(t TestingT, interfaceObject any, object any, msgAndArgs ...any)
- func Implementsf(t TestingT, interfaceObject any, object any, msg string, args ...any)
- func IsType(t TestingT, expectedType any, object any, msgAndArgs ...any)
- func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool
- func Len(t TestingT, object any, length int, msgAndArgs ...any)
- func Nil(t TestingT, object any, msgAndArgs ...any)
- func NoDirExists(t TestingT, path string, msgAndArgs ...interface{}) bool
- func NoError(t TestingT, err error, msgAndArgs ...any)
- func NoFileExists(t TestingT, path string, msgAndArgs ...interface{}) bool
- func NotNil(t TestingT, object any, msgAndArgs ...any)
- func Panics(t TestingT, f PanicTestFunc, msgAndArgs ...any)
- func True(t TestingT, value bool, msgAndArgs ...any)
- func YAMLEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool
- type Comparison
- type PanicTestFunc
- type TestingT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Condition ¶
func Condition(t TestingT, comp Comparison, msgAndArgs ...any)
func Conditionf ¶
func Conditionf(t TestingT, comp Comparison, msg string, args ...any)
func ElementsMatchf ¶
func EqualErrorf ¶
func EqualExportedValues ¶
func EqualExportedValuesf ¶
func EqualValuesf ¶
func ErrorAs ¶
ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. This is a wrapper for errors.As.
func ErrorContains ¶
func ErrorContainsf ¶
func ErrorIs ¶
ErrorIs asserts that at least one of the errors in err's chain matches target. This is a wrapper for errors.Is.
func Eventually ¶
func EventuallyWithT ¶
func EventuallyWithTf ¶
func Eventuallyf ¶
func FileExists ¶
func GreaterOrEqualf ¶
func HTTPBodyContains ¶
func HTTPBodyContainsf ¶
func HTTPBodyNotContains ¶
func HTTPBodyNotContainsf ¶
func HTTPErrorf ¶
func HTTPRedirect ¶
func HTTPRedirectf ¶
func HTTPStatusCode ¶
func HTTPStatusCodef ¶
func HTTPSuccess ¶
func HTTPSuccessf ¶
func Implementsf ¶
func NoDirExists ¶
NoDirExists checks whether a directory does not exist in the given path. It fails if the path points to an existing _directory_ only.
func NoFileExists ¶
func Panics ¶
func Panics(t TestingT, f PanicTestFunc, msgAndArgs ...any)
Types ¶
type Comparison ¶
type Comparison func() (success bool)
type PanicTestFunc ¶
type PanicTestFunc func()
Click to show internal directories.
Click to hide internal directories.