Versions in this module Expand all Collapse all v1 v1.5.2 Sep 15, 2023 v1.5.1 Sep 15, 2023 Changes in this version + func Condition(t TestingT, comp assert.Comparison, msgAndArgs ...interface{}) + func Conditionf(t TestingT, comp assert.Comparison, msg string, args ...interface{}) + func Contains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) + func Containsf(t TestingT, s interface{}, contains interface{}, msg string, ...) + func DirExists(t TestingT, path string, msgAndArgs ...interface{}) + func DirExistsf(t TestingT, path string, msg string, args ...interface{}) + func ElementsMatch(t TestingT, listA interface{}, listB interface{}, msgAndArgs ...interface{}) + func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, ...) + func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) + func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) + func Equal(t TestingT, expected interface{}, actual interface{}, ...) + func EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) + func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) + func EqualValues(t TestingT, expected interface{}, actual interface{}, ...) + func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, ...) + func Equalf(t TestingT, expected interface{}, actual interface{}, msg string, ...) + func Error(t TestingT, err error, msgAndArgs ...interface{}) + func Errorf(t TestingT, err error, msg string, args ...interface{}) + func Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, ...) + func Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, ...) + func Exactly(t TestingT, expected interface{}, actual interface{}, ...) + func Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, ...) + func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) + func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) + func FailNowf(t TestingT, failureMessage string, msg string, args ...interface{}) + func Failf(t TestingT, failureMessage string, msg string, args ...interface{}) + func False(t TestingT, value bool, msgAndArgs ...interface{}) + func Falsef(t TestingT, value bool, msg string, args ...interface{}) + func FileExists(t TestingT, path string, msgAndArgs ...interface{}) + func FileExistsf(t TestingT, path string, msg string, args ...interface{}) + func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) + func GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) + func GreaterOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) + func Greaterf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) + 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 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 interface{}, object interface{}, ...) + func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, ...) + func InDelta(t TestingT, expected interface{}, actual interface{}, delta float64, ...) + func InDeltaMapValues(t TestingT, expected interface{}, actual interface{}, delta float64, ...) + func InDeltaMapValuesf(t TestingT, expected interface{}, actual interface{}, delta float64, ...) + func InDeltaSlice(t TestingT, expected interface{}, actual interface{}, delta float64, ...) + func InDeltaSlicef(t TestingT, expected interface{}, actual interface{}, delta float64, ...) + func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, ...) + func InEpsilon(t TestingT, expected interface{}, actual interface{}, epsilon float64, ...) + func InEpsilonSlice(t TestingT, expected interface{}, actual interface{}, epsilon float64, ...) + func InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsilon float64, ...) + func InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon float64, ...) + func IsType(t TestingT, expectedType interface{}, object interface{}, ...) + func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg string, ...) + func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) + func JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) + func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) + func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) + func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) + func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) + func LessOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) + func Lessf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) + func Never(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, ...) + func Neverf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, ...) + func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) + func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) + func NoDirExists(t TestingT, path string, msgAndArgs ...interface{}) + func NoDirExistsf(t TestingT, path string, msg string, args ...interface{}) + func NoError(t TestingT, err error, msgAndArgs ...interface{}) + func NoErrorf(t TestingT, err error, msg string, args ...interface{}) + func NoFileExists(t TestingT, path string, msgAndArgs ...interface{}) + func NoFileExistsf(t TestingT, path string, msg string, args ...interface{}) + func NotContains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) + func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, ...) + func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) + func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) + func NotEqual(t TestingT, expected interface{}, actual interface{}, ...) + func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, ...) + func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) + func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) + func NotPanics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) + func NotPanicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{}) + func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) + func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) + func NotSame(t TestingT, expected interface{}, actual interface{}, ...) + func NotSamef(t TestingT, expected interface{}, actual interface{}, msg string, ...) + func NotSubset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) + func NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, ...) + func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) + func NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) + func Panics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) + func PanicsWithError(t TestingT, errString string, f assert.PanicTestFunc, ...) + func PanicsWithErrorf(t TestingT, errString string, f assert.PanicTestFunc, msg string, ...) + func PanicsWithValue(t TestingT, expected interface{}, f assert.PanicTestFunc, ...) + func PanicsWithValuef(t TestingT, expected interface{}, f assert.PanicTestFunc, msg string, ...) + func Panicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{}) + func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) + func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) + func Same(t TestingT, expected interface{}, actual interface{}, ...) + func Samef(t TestingT, expected interface{}, actual interface{}, msg string, ...) + func Subset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) + func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, ...) + func True(t TestingT, value bool, msgAndArgs ...interface{}) + func Truef(t TestingT, value bool, msg string, args ...interface{}) + func WithinDuration(t TestingT, expected time.Time, actual time.Time, delta time.Duration, ...) + func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, ...) + func YAMLEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) + func YAMLEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) + func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) + func Zerof(t TestingT, i interface{}, msg string, args ...interface{}) + type Assertions struct + func New(t TestingT) *Assertions + func (a *Assertions) Condition(comp assert.Comparison, msgAndArgs ...interface{}) + func (a *Assertions) Conditionf(comp assert.Comparison, msg string, args ...interface{}) + func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) + func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) + func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) + func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) + func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) + func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) + func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) + func (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) + func (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{}) + func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) + func (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{}) + func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) + func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) + func (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string, args ...interface{}) + func (a *Assertions) Error(err error, msgAndArgs ...interface{}) + func (a *Assertions) Errorf(err error, msg string, args ...interface{}) + func (a *Assertions) Eventually(condition func() bool, waitFor time.Duration, tick time.Duration, ...) + func (a *Assertions) Eventuallyf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, ...) + func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) + func (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) + func (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) + func (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{}) + func (a *Assertions) FailNowf(failureMessage string, msg string, args ...interface{}) + func (a *Assertions) Failf(failureMessage string, msg string, args ...interface{}) + func (a *Assertions) False(value bool, msgAndArgs ...interface{}) + func (a *Assertions) Falsef(value bool, msg string, args ...interface{}) + func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) + func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) + func (a *Assertions) Greater(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) + func (a *Assertions) GreaterOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) + func (a *Assertions) GreaterOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) + func (a *Assertions) Greaterf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) + func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, ...) + func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, ...) + func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, ...) + func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, ...) + func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, ...) + func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, ...) + func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, ...) + func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, ...) + func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, ...) + func (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, ...) + func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) + func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, ...) + func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, ...) + func (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, ...) + func (a *Assertions) InDeltaMapValuesf(expected interface{}, actual interface{}, delta float64, msg string, ...) + func (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, ...) + func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, delta float64, msg string, ...) + func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, ...) + func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, ...) + func (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, ...) + func (a *Assertions) InEpsilonSlicef(expected interface{}, actual interface{}, epsilon float64, msg string, ...) + func (a *Assertions) InEpsilonf(expected interface{}, actual interface{}, epsilon float64, msg string, ...) + func (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) + func (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg string, args ...interface{}) + func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) + func (a *Assertions) JSONEqf(expected string, actual string, msg string, args ...interface{}) + func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) + func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...interface{}) + func (a *Assertions) Less(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) + func (a *Assertions) LessOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) + func (a *Assertions) LessOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) + func (a *Assertions) Lessf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) + func (a *Assertions) Never(condition func() bool, waitFor time.Duration, tick time.Duration, ...) + func (a *Assertions) Neverf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, ...) + func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) + func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) + func (a *Assertions) NoDirExists(path string, msgAndArgs ...interface{}) + func (a *Assertions) NoDirExistsf(path string, msg string, args ...interface{}) + func (a *Assertions) NoError(err error, msgAndArgs ...interface{}) + func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) + func (a *Assertions) NoFileExists(path string, msgAndArgs ...interface{}) + func (a *Assertions) NoFileExistsf(path string, msg string, args ...interface{}) + func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) + func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg string, args ...interface{}) + func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) + func (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface{}) + func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) + func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg string, args ...interface{}) + func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) + func (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{}) + func (a *Assertions) NotPanics(f assert.PanicTestFunc, msgAndArgs ...interface{}) + func (a *Assertions) NotPanicsf(f assert.PanicTestFunc, msg string, args ...interface{}) + func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) + func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) + func (a *Assertions) NotSame(expected interface{}, actual interface{}, msgAndArgs ...interface{}) + func (a *Assertions) NotSamef(expected interface{}, actual interface{}, msg string, args ...interface{}) + func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) + func (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) + func (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) + func (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{}) + func (a *Assertions) Panics(f assert.PanicTestFunc, msgAndArgs ...interface{}) + func (a *Assertions) PanicsWithError(errString string, f assert.PanicTestFunc, msgAndArgs ...interface{}) + func (a *Assertions) PanicsWithErrorf(errString string, f assert.PanicTestFunc, msg string, args ...interface{}) + func (a *Assertions) PanicsWithValue(expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{}) + func (a *Assertions) PanicsWithValuef(expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{}) + func (a *Assertions) Panicsf(f assert.PanicTestFunc, msg string, args ...interface{}) + func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) + func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) + func (a *Assertions) Same(expected interface{}, actual interface{}, msgAndArgs ...interface{}) + func (a *Assertions) Samef(expected interface{}, actual interface{}, msg string, args ...interface{}) + func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) + func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) + func (a *Assertions) True(value bool, msgAndArgs ...interface{}) + func (a *Assertions) Truef(value bool, msg string, args ...interface{}) + func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, ...) + func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, ...) + func (a *Assertions) YAMLEq(expected string, actual string, msgAndArgs ...interface{}) + func (a *Assertions) YAMLEqf(expected string, actual string, msg string, args ...interface{}) + func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) + func (a *Assertions) Zerof(i interface{}, msg string, args ...interface{}) + type BoolAssertionFunc func(TestingT, bool, ...interface{}) + type ComparisonAssertionFunc func(TestingT, interface{}, interface{}, ...interface{}) + type ErrorAssertionFunc func(TestingT, error, ...interface{}) + type TestingT interface + Errorf func(format string, args ...interface{}) + FailNow func() + type ValueAssertionFunc func(TestingT, interface{}, ...interface{})