require

package
v0.0.0-...-265c608 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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 Contains

func Contains(t TestingT, s any, contains any, msgAndArgs ...any)

func Containsf

func Containsf(t TestingT, s any, contains any, msg string, args ...any)

func DirExists

func DirExists(t TestingT, path string, msgAndArgs ...any)

func DirExistsf

func DirExistsf(t TestingT, path string, msg string, args ...any)

func ElementsMatch

func ElementsMatch(t TestingT, listA any, listB any, msgAndArgs ...any)

func ElementsMatchf

func ElementsMatchf(t TestingT, listA any, listB any, msg string, args ...any)

func Empty

func Empty(t TestingT, object any, msgAndArgs ...any)

func Equal

func Equal(t TestingT, expected any, actual any, msgAndArgs ...any)

func EqualError

func EqualError(t TestingT, theError error, errString string, msgAndArgs ...any)

func EqualErrorf

func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...any)

func EqualExportedValues

func EqualExportedValues(t TestingT, expected any, actual any, msgAndArgs ...any)

func EqualExportedValuesf

func EqualExportedValuesf(t TestingT, expected any, actual any, msg string, args ...any)

func EqualValues

func EqualValues(t TestingT, expected any, actual any, msgAndArgs ...any)

func EqualValuesf

func EqualValuesf(t TestingT, expected any, actual any, msg string, args ...any)

func Equalf

func Equalf(t TestingT, expected any, actual any, msg string, args ...any)

func Error

func Error(t TestingT, err error, msgAndArgs ...any)

func ErrorAs

func ErrorAs(t TestingT, err error, target any, msgAndArgs ...any)

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 ErrorAsf

func ErrorAsf(t TestingT, err error, target any, msg string, args ...any)

func ErrorContains

func ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...any)

func ErrorContainsf

func ErrorContainsf(t TestingT, theError error, contains string, msg string, args ...any)

func ErrorIs

func ErrorIs(t TestingT, err error, target error, msgAndArgs ...any)

ErrorIs asserts that at least one of the errors in err's chain matches target. This is a wrapper for errors.Is.

func ErrorIsf

func ErrorIsf(t TestingT, err error, target error, msg string, args ...any)

func Errorf

func Errorf(t TestingT, err error, msg string, args ...any)

func Eventually

func Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...any)

func EventuallyWithT

func EventuallyWithT(t TestingT, condition func(collect TestingT), waitFor time.Duration, tick time.Duration, msgAndArgs ...any)

func EventuallyWithTf

func EventuallyWithTf(t TestingT, condition func(collect TestingT), waitFor time.Duration, tick time.Duration, msg string, args ...any)

func Eventuallyf

func Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...any)

func Exactly

func Exactly(t TestingT, expected any, actual any, msgAndArgs ...any)

func Exactlyf

func Exactlyf(t TestingT, expected any, actual any, msg string, args ...any)

func Fail

func Fail(t TestingT, failureMessage string, msgAndArgs ...any)

func FailNow

func FailNow(t TestingT, failureMessage string, msgAndArgs ...any)

func FailNowf

func FailNowf(t TestingT, failureMessage string, msg string, args ...any)

func Failf

func Failf(t TestingT, failureMessage string, msg string, args ...any)

func False

func False(t TestingT, value bool, msgAndArgs ...any)

func Falsef

func Falsef(t TestingT, value bool, msg string, args ...any)

func FileExists

func FileExists(t TestingT, path string, msgAndArgs ...any)

func Greater

func Greater[T cmp.Ordered](t TestingT, e1 T, e2 T, msgAndArgs ...any)

func GreaterOrEqual

func GreaterOrEqual[T cmp.Ordered](t TestingT, e1 T, e2 T, msgAndArgs ...any)

func GreaterOrEqualf

func GreaterOrEqualf[T cmp.Ordered](t TestingT, e1 T, e2 T, msg string, args ...any)

func Greaterf

func Greaterf[T cmp.Ordered](t TestingT, e1 T, e2 T, msg string, args ...any)

func HTTPBodyContains

func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str any, msgAndArgs ...any)

func HTTPBodyContainsf

func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str any, msg string, args ...any)

func HTTPBodyNotContains

func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str any, msgAndArgs ...any)

func HTTPBodyNotContainsf

func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str any, msg string, args ...any)

func HTTPError

func HTTPError(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...any)

func HTTPErrorf

func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any)

func HTTPRedirect

func HTTPRedirect(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...any)

func HTTPRedirectf

func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any)

func HTTPStatusCode

func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...any)

func HTTPStatusCodef

func HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...any)

func HTTPSuccess

func HTTPSuccess(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...any)

func HTTPSuccessf

func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any)

func Implements

func Implements(t TestingT, interfaceObject any, object any, msgAndArgs ...any)

func Implementsf

func Implementsf(t TestingT, interfaceObject any, object any, msg string, args ...any)

func IsType

func IsType(t TestingT, expectedType any, object any, msgAndArgs ...any)

func JSONEq

func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool

func Len

func Len(t TestingT, object any, length int, msgAndArgs ...any)

func Nil

func Nil(t TestingT, object any, msgAndArgs ...any)

func NoDirExists

func NoDirExists(t TestingT, path string, msgAndArgs ...interface{}) bool

NoDirExists checks whether a directory does not exist in the given path. It fails if the path points to an existing _directory_ only.

func NoError

func NoError(t TestingT, err error, msgAndArgs ...any)

func NoFileExists

func NoFileExists(t TestingT, path string, msgAndArgs ...interface{}) bool

func NotNil

func NotNil(t TestingT, object any, msgAndArgs ...any)

func Panics

func Panics(t TestingT, f PanicTestFunc, msgAndArgs ...any)

func True

func True(t TestingT, value bool, msgAndArgs ...any)

func YAMLEq

func YAMLEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool

Types

type Comparison

type Comparison func() (success bool)

type PanicTestFunc

type PanicTestFunc func()

type TestingT

type TestingT = testing.TB

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL