Documentation
¶
Overview ¶
Package require proxies testify requirements and reports each requirement as an Allure step.
Index ¶
- 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 EqualExportedValues(t TestingT, expected interface{}, actual interface{}, ...)
- func EqualExportedValuesf(t TestingT, expected interface{}, actual interface{}, msg string, ...)
- 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 ErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{})
- func ErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{})
- func ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...interface{})
- func ErrorContainsf(t TestingT, theError error, contains string, msg string, args ...interface{})
- func ErrorIs(t TestingT, err error, target error, msgAndArgs ...interface{})
- func ErrorIsf(t TestingT, err error, target error, msg string, args ...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 EventuallyWithT(t TestingT, condition func(collect *assert.CollectT), waitFor time.Duration, ...)
- func EventuallyWithTf(t TestingT, condition func(collect *assert.CollectT), waitFor 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 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 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 IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{})
- func IsDecreasingf(t TestingT, object interface{}, msg string, args ...interface{})
- func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{})
- func IsIncreasingf(t TestingT, object interface{}, msg string, args ...interface{})
- func IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{})
- func IsNonDecreasingf(t TestingT, object interface{}, msg string, args ...interface{})
- func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{})
- func IsNonIncreasingf(t TestingT, object interface{}, msg string, args ...interface{})
- func IsNotType(t TestingT, theType interface{}, object interface{}, msgAndArgs ...interface{})
- func IsNotTypef(t TestingT, theType interface{}, object interface{}, msg string, ...)
- 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 Negative(t TestingT, e interface{}, msgAndArgs ...interface{})
- func Negativef(t TestingT, e 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 NotElementsMatch(t TestingT, listA interface{}, listB interface{}, msgAndArgs ...interface{})
- func NotElementsMatchf(t TestingT, listA interface{}, listB 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 NotEqualValues(t TestingT, expected interface{}, actual interface{}, ...)
- func NotEqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, ...)
- func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, ...)
- func NotErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{})
- func NotErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{})
- func NotErrorIs(t TestingT, err error, target error, msgAndArgs ...interface{})
- func NotErrorIsf(t TestingT, err error, target error, msg string, args ...interface{})
- func NotImplements(t TestingT, interfaceObject interface{}, object interface{}, ...)
- func NotImplementsf(t TestingT, interfaceObject interface{}, object 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 Positive(t TestingT, e interface{}, msgAndArgs ...interface{})
- func Positivef(t TestingT, e interface{}, 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 WithinRange(t TestingT, actual time.Time, start time.Time, end time.Time, ...)
- func WithinRangef(t TestingT, actual time.Time, start time.Time, end time.Time, msg string, ...)
- 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
- 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) EqualExportedValues(expected interface{}, actual interface{}, msgAndArgs ...interface{})
- func (a *Assertions) EqualExportedValuesf(expected interface{}, actual interface{}, 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) ErrorAs(err error, target interface{}, msgAndArgs ...interface{})
- func (a *Assertions) ErrorAsf(err error, target interface{}, msg string, args ...interface{})
- func (a *Assertions) ErrorContains(theError error, contains string, msgAndArgs ...interface{})
- func (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{})
- func (a *Assertions) ErrorIs(err error, target error, msgAndArgs ...interface{})
- func (a *Assertions) ErrorIsf(err error, target error, msg string, args ...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) EventuallyWithT(condition func(collect *assert.CollectT), waitFor time.Duration, ...)
- func (a *Assertions) EventuallyWithTf(condition func(collect *assert.CollectT), waitFor 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) HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, ...)
- func (a *Assertions) HTTPStatusCodef(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) IsDecreasing(object interface{}, msgAndArgs ...interface{})
- func (a *Assertions) IsDecreasingf(object interface{}, msg string, args ...interface{})
- func (a *Assertions) IsIncreasing(object interface{}, msgAndArgs ...interface{})
- func (a *Assertions) IsIncreasingf(object interface{}, msg string, args ...interface{})
- func (a *Assertions) IsNonDecreasing(object interface{}, msgAndArgs ...interface{})
- func (a *Assertions) IsNonDecreasingf(object interface{}, msg string, args ...interface{})
- func (a *Assertions) IsNonIncreasing(object interface{}, msgAndArgs ...interface{})
- func (a *Assertions) IsNonIncreasingf(object interface{}, msg string, args ...interface{})
- func (a *Assertions) IsNotType(theType interface{}, object interface{}, msgAndArgs ...interface{})
- func (a *Assertions) IsNotTypef(theType interface{}, object interface{}, msg string, args ...interface{})
- 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) Negative(e interface{}, msgAndArgs ...interface{})
- func (a *Assertions) Negativef(e 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) NotElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{})
- func (a *Assertions) NotElementsMatchf(listA interface{}, listB 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) NotEqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{})
- func (a *Assertions) NotEqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{})
- func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg string, args ...interface{})
- func (a *Assertions) NotErrorAs(err error, target interface{}, msgAndArgs ...interface{})
- func (a *Assertions) NotErrorAsf(err error, target interface{}, msg string, args ...interface{})
- func (a *Assertions) NotErrorIs(err error, target error, msgAndArgs ...interface{})
- func (a *Assertions) NotErrorIsf(err error, target error, msg string, args ...interface{})
- func (a *Assertions) NotImplements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{})
- func (a *Assertions) NotImplementsf(interfaceObject interface{}, object interface{}, msg string, ...)
- 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) Positive(e interface{}, msgAndArgs ...interface{})
- func (a *Assertions) Positivef(e interface{}, 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) WithinRange(actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{})
- func (a *Assertions) WithinRangef(actual time.Time, start time.Time, end time.Time, 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
- type ComparisonAssertionFunc
- type ErrorAssertionFunc
- type TestingT
- type ValueAssertionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Condition ¶
func Condition(t TestingT, comp assert.Comparison, msgAndArgs ...interface{})
Condition uses a Comparison to assert a complex condition.
func Conditionf ¶
func Conditionf(t TestingT, comp assert.Comparison, msg string, args ...interface{})
Conditionf uses a Comparison to assert a complex condition.
func Contains ¶
func Contains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{})
Contains asserts that the specified string, list(array, slice...) or map contains the specified substring or element.
require.Contains(t, "Hello World", "World")
require.Contains(t, ["Hello", "World"], "World")
require.Contains(t, {"Hello": "World"}, "Hello")
func Containsf ¶
Containsf asserts that the specified string, list(array, slice...) or map contains the specified substring or element.
require.Containsf(t, "Hello World", "World", "error message %s", "formatted")
require.Containsf(t, ["Hello", "World"], "World", "error message %s", "formatted")
require.Containsf(t, {"Hello": "World"}, "Hello", "error message %s", "formatted")
func DirExists ¶
DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
func DirExistsf ¶
DirExistsf checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
func ElementsMatch ¶
func ElementsMatch(t TestingT, listA interface{}, listB interface{}, msgAndArgs ...interface{})
ElementsMatch asserts that the specified listA(array, slice...) is equal to specified listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, the number of appearances of each of them in both lists should match.
require.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2])
func ElementsMatchf ¶
func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{})
ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, the number of appearances of each of them in both lists should match.
require.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted")
func Empty ¶
func Empty(t TestingT, object interface{}, msgAndArgs ...interface{})
Empty asserts that the given value is "empty".
Zero values are "empty".
Arrays are "empty" if every element is the zero value of the type (stricter than "empty").
Slices, maps and channels with zero length are "empty".
Pointer values are "empty" if the pointer is nil or if the pointed value is "empty".
require.Empty(t, obj)
func Emptyf ¶
Emptyf asserts that the given value is "empty".
Zero values are "empty".
Arrays are "empty" if every element is the zero value of the type (stricter than "empty").
Slices, maps and channels with zero length are "empty".
Pointer values are "empty" if the pointer is nil or if the pointed value is "empty".
require.Emptyf(t, obj, "error message %s", "formatted")
func Equal ¶
func Equal(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{})
Equal asserts that two objects are equal.
require.Equal(t, 123, 123)
Pointer variable equality is determined based on the equality of the referenced values (as opposed to the memory addresses). Function equality cannot be determined and will always fail.
func EqualError ¶
EqualError asserts that a function returned an error (i.e. not `nil`) and that it is equal to the provided error.
actualObj, err := SomeFunction() require.EqualError(t, err, expectedErrorString)
func EqualErrorf ¶
EqualErrorf asserts that a function returned an error (i.e. not `nil`) and that it is equal to the provided error.
actualObj, err := SomeFunction() require.EqualErrorf(t, err, expectedErrorString, "error message %s", "formatted")
func EqualExportedValues ¶
func EqualExportedValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{})
EqualExportedValues asserts that the types of two objects are equal and their public fields are also equal. This is useful for comparing structs that have private fields that could potentially differ.
type S struct {
Exported int
notExported int
}
require.EqualExportedValues(t, S{1, 2}, S{1, 3}) => true
require.EqualExportedValues(t, S{1, 2}, S{2, 3}) => false
func EqualExportedValuesf ¶
func EqualExportedValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{})
EqualExportedValuesf asserts that the types of two objects are equal and their public fields are also equal. This is useful for comparing structs that have private fields that could potentially differ.
type S struct {
Exported int
notExported int
}
require.EqualExportedValuesf(t, S{1, 2}, S{1, 3}, "error message %s", "formatted") => true
require.EqualExportedValuesf(t, S{1, 2}, S{2, 3}, "error message %s", "formatted") => false
func EqualValues ¶
func EqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{})
EqualValues asserts that two objects are equal or convertible to the larger type and equal.
require.EqualValues(t, uint32(123), int32(123))
func EqualValuesf ¶
func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{})
EqualValuesf asserts that two objects are equal or convertible to the larger type and equal.
require.EqualValuesf(t, uint32(123), int32(123), "error message %s", "formatted")
func Equalf ¶
Equalf asserts that two objects are equal.
require.Equalf(t, 123, 123, "error message %s", "formatted")
Pointer variable equality is determined based on the equality of the referenced values (as opposed to the memory addresses). Function equality cannot be determined and will always fail.
func Error ¶
Error asserts that a function returned an error (i.e. not `nil`).
actualObj, err := SomeFunction() require.Error(t, err)
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 ErrorAsf ¶
ErrorAsf 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 ¶
ErrorContains asserts that a function returned an error (i.e. not `nil`) and that the error contains the specified substring.
actualObj, err := SomeFunction() require.ErrorContains(t, err, expectedErrorSubString)
func ErrorContainsf ¶
ErrorContainsf asserts that a function returned an error (i.e. not `nil`) and that the error contains the specified substring.
actualObj, err := SomeFunction() require.ErrorContainsf(t, err, expectedErrorSubString, "error message %s", "formatted")
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 ErrorIsf ¶
ErrorIsf asserts that at least one of the errors in err's chain matches target. This is a wrapper for errors.Is.
func Errorf ¶
Errorf asserts that a function returned an error (i.e. not `nil`).
actualObj, err := SomeFunction() require.Errorf(t, err, "error message %s", "formatted")
func Eventually ¶
func Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{})
Eventually asserts that given condition will be met in waitFor time, periodically checking target function each tick.
require.Eventually(t, func() bool { return true; }, time.Second, 10*time.Millisecond)
func EventuallyWithT ¶
func EventuallyWithT(t TestingT, condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{})
EventuallyWithT asserts that given condition will be met in waitFor time, periodically checking target function each tick. In contrast to Eventually, it supplies a CollectT to the condition function, so that the condition function can use the CollectT to call other assertions. The condition is considered "met" if no errors are raised in a tick. The supplied CollectT collects all errors from one tick (if there are any). If the condition is not met before waitFor, the collected errors of the last tick are copied to t.
externalValue := false
go func() {
time.Sleep(8*time.Second)
externalValue = true
}()
require.EventuallyWithT(t, func(c *require.CollectT) {
// add assertions as needed; any assertion failure will fail the current tick
require.True(c, externalValue, "expected 'externalValue' to be true")
}, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false")
func EventuallyWithTf ¶
func EventuallyWithTf(t TestingT, condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{})
EventuallyWithTf asserts that given condition will be met in waitFor time, periodically checking target function each tick. In contrast to Eventually, it supplies a CollectT to the condition function, so that the condition function can use the CollectT to call other assertions. The condition is considered "met" if no errors are raised in a tick. The supplied CollectT collects all errors from one tick (if there are any). If the condition is not met before waitFor, the collected errors of the last tick are copied to t.
externalValue := false
go func() {
time.Sleep(8*time.Second)
externalValue = true
}()
require.EventuallyWithTf(t, func(c *require.CollectT, "error message %s", "formatted") {
// add assertions as needed; any assertion failure will fail the current tick
require.True(c, externalValue, "expected 'externalValue' to be true")
}, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false")
func Eventuallyf ¶
func Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{})
Eventuallyf asserts that given condition will be met in waitFor time, periodically checking target function each tick.
require.Eventuallyf(t, func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted")
func Exactly ¶
func Exactly(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{})
Exactly asserts that two objects are equal in value and type.
require.Exactly(t, int32(123), int64(123))
func Exactlyf ¶
func Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{})
Exactlyf asserts that two objects are equal in value and type.
require.Exactlyf(t, int32(123), int64(123), "error message %s", "formatted")
func Falsef ¶
Falsef asserts that the specified value is false.
require.Falsef(t, myBool, "error message %s", "formatted")
func FileExists ¶
FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.
func FileExistsf ¶
FileExistsf checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.
func Greater ¶
func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{})
Greater asserts that the first element is greater than the second
require.Greater(t, 2, 1) require.Greater(t, float64(2), float64(1)) require.Greater(t, "b", "a")
func GreaterOrEqual ¶
func GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{})
GreaterOrEqual asserts that the first element is greater than or equal to the second
require.GreaterOrEqual(t, 2, 1) require.GreaterOrEqual(t, 2, 2) require.GreaterOrEqual(t, "b", "a") require.GreaterOrEqual(t, "b", "b")
func GreaterOrEqualf ¶
GreaterOrEqualf asserts that the first element is greater than or equal to the second
require.GreaterOrEqualf(t, 2, 1, "error message %s", "formatted") require.GreaterOrEqualf(t, 2, 2, "error message %s", "formatted") require.GreaterOrEqualf(t, "b", "a", "error message %s", "formatted") require.GreaterOrEqualf(t, "b", "b", "error message %s", "formatted")
func Greaterf ¶
Greaterf asserts that the first element is greater than the second
require.Greaterf(t, 2, 1, "error message %s", "formatted") require.Greaterf(t, float64(2), float64(1), "error message %s", "formatted") require.Greaterf(t, "b", "a", "error message %s", "formatted")
func HTTPBodyContains ¶
func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{})
HTTPBodyContains asserts that a specified handler returns a body that contains a string.
require.HTTPBodyContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky")
Returns whether the assertion was successful (true) or not (false).
func HTTPBodyContainsf ¶
func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{})
HTTPBodyContainsf asserts that a specified handler returns a body that contains a string.
require.HTTPBodyContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted")
Returns whether the assertion was successful (true) or not (false).
func HTTPBodyNotContains ¶
func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{})
HTTPBodyNotContains asserts that a specified handler returns a body that does not contain a string.
require.HTTPBodyNotContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky")
Returns whether the assertion was successful (true) or not (false).
func HTTPBodyNotContainsf ¶
func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{})
HTTPBodyNotContainsf asserts that a specified handler returns a body that does not contain a string.
require.HTTPBodyNotContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted")
Returns whether the assertion was successful (true) or not (false).
func HTTPError ¶
func HTTPError(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{})
HTTPError asserts that a specified handler returns an error status code.
require.HTTPError(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}}
Returns whether the assertion was successful (true) or not (false).
func HTTPErrorf ¶
func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{})
HTTPErrorf asserts that a specified handler returns an error status code.
require.HTTPErrorf(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}}
Returns whether the assertion was successful (true) or not (false).
func HTTPRedirect ¶
func HTTPRedirect(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{})
HTTPRedirect asserts that a specified handler returns a redirect status code.
require.HTTPRedirect(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}}
Returns whether the assertion was successful (true) or not (false).
func HTTPRedirectf ¶
func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{})
HTTPRedirectf asserts that a specified handler returns a redirect status code.
require.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}}
Returns whether the assertion was successful (true) or not (false).
func HTTPStatusCode ¶
func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{})
HTTPStatusCode asserts that a specified handler returns a specified status code.
require.HTTPStatusCode(t, myHandler, "GET", "/notImplemented", nil, 501)
Returns whether the assertion was successful (true) or not (false).
func HTTPStatusCodef ¶
func HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{})
HTTPStatusCodef asserts that a specified handler returns a specified status code.
require.HTTPStatusCodef(t, myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted")
Returns whether the assertion was successful (true) or not (false).
func HTTPSuccess ¶
func HTTPSuccess(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{})
HTTPSuccess asserts that a specified handler returns a success status code.
require.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil)
Returns whether the assertion was successful (true) or not (false).
func HTTPSuccessf ¶
func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{})
HTTPSuccessf asserts that a specified handler returns a success status code.
require.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted")
Returns whether the assertion was successful (true) or not (false).
func Implements ¶
func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{})
Implements asserts that an object is implemented by the specified interface.
require.Implements(t, (*MyInterface)(nil), new(MyObject))
func Implementsf ¶
func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{})
Implementsf asserts that an object is implemented by the specified interface.
require.Implementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted")
func InDelta ¶
func InDelta(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{})
InDelta asserts that the two numerals are within delta of each other.
require.InDelta(t, math.Pi, 22/7.0, 0.01)
func InDeltaMapValues ¶
func InDeltaMapValues(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{})
InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.
func InDeltaMapValuesf ¶
func InDeltaMapValuesf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{})
InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.
func InDeltaSlice ¶
func InDeltaSlice(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{})
InDeltaSlice is the same as InDelta, except it compares two slices.
func InDeltaSlicef ¶
func InDeltaSlicef(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{})
InDeltaSlicef is the same as InDelta, except it compares two slices.
func InDeltaf ¶
func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{})
InDeltaf asserts that the two numerals are within delta of each other.
require.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted")
func InEpsilon ¶
func InEpsilon(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{})
InEpsilon asserts that expected and actual have a relative error less than epsilon
func InEpsilonSlice ¶
func InEpsilonSlice(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{})
InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices.
func InEpsilonSlicef ¶
func InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{})
InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices.
func InEpsilonf ¶
func InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{})
InEpsilonf asserts that expected and actual have a relative error less than epsilon
func IsDecreasing ¶
func IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{})
IsDecreasing asserts that the collection is decreasing
require.IsDecreasing(t, []int{2, 1, 0})
require.IsDecreasing(t, []float{2, 1})
require.IsDecreasing(t, []string{"b", "a"})
func IsDecreasingf ¶
IsDecreasingf asserts that the collection is decreasing
require.IsDecreasingf(t, []int{2, 1, 0}, "error message %s", "formatted")
require.IsDecreasingf(t, []float{2, 1}, "error message %s", "formatted")
require.IsDecreasingf(t, []string{"b", "a"}, "error message %s", "formatted")
func IsIncreasing ¶
func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{})
IsIncreasing asserts that the collection is increasing
require.IsIncreasing(t, []int{1, 2, 3})
require.IsIncreasing(t, []float{1, 2})
require.IsIncreasing(t, []string{"a", "b"})
func IsIncreasingf ¶
IsIncreasingf asserts that the collection is increasing
require.IsIncreasingf(t, []int{1, 2, 3}, "error message %s", "formatted")
require.IsIncreasingf(t, []float{1, 2}, "error message %s", "formatted")
require.IsIncreasingf(t, []string{"a", "b"}, "error message %s", "formatted")
func IsNonDecreasing ¶
func IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{})
IsNonDecreasing asserts that the collection is not decreasing
require.IsNonDecreasing(t, []int{1, 1, 2})
require.IsNonDecreasing(t, []float{1, 2})
require.IsNonDecreasing(t, []string{"a", "b"})
func IsNonDecreasingf ¶
IsNonDecreasingf asserts that the collection is not decreasing
require.IsNonDecreasingf(t, []int{1, 1, 2}, "error message %s", "formatted")
require.IsNonDecreasingf(t, []float{1, 2}, "error message %s", "formatted")
require.IsNonDecreasingf(t, []string{"a", "b"}, "error message %s", "formatted")
func IsNonIncreasing ¶
func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{})
IsNonIncreasing asserts that the collection is not increasing
require.IsNonIncreasing(t, []int{2, 1, 1})
require.IsNonIncreasing(t, []float{2, 1})
require.IsNonIncreasing(t, []string{"b", "a"})
func IsNonIncreasingf ¶
IsNonIncreasingf asserts that the collection is not increasing
require.IsNonIncreasingf(t, []int{2, 1, 1}, "error message %s", "formatted")
require.IsNonIncreasingf(t, []float{2, 1}, "error message %s", "formatted")
require.IsNonIncreasingf(t, []string{"b", "a"}, "error message %s", "formatted")
func IsNotType ¶
func IsNotType(t TestingT, theType interface{}, object interface{}, msgAndArgs ...interface{})
IsNotType asserts that the specified objects are not of the same type.
require.IsNotType(t, &NotMyStruct{}, &MyStruct{})
func IsNotTypef ¶
func IsNotTypef(t TestingT, theType interface{}, object interface{}, msg string, args ...interface{})
IsNotTypef asserts that the specified objects are not of the same type.
require.IsNotTypef(t, &NotMyStruct{}, &MyStruct{}, "error message %s", "formatted")
func IsType ¶
func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{})
IsType asserts that the specified objects are of the same type.
require.IsType(t, &MyStruct{}, &MyStruct{})
func IsTypef ¶
func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg string, args ...interface{})
IsTypef asserts that the specified objects are of the same type.
require.IsTypef(t, &MyStruct{}, &MyStruct{}, "error message %s", "formatted")
func JSONEq ¶
JSONEq asserts that two JSON strings are equivalent.
require.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
func JSONEqf ¶
JSONEqf asserts that two JSON strings are equivalent.
require.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted")
func Len ¶
Len asserts that the specified object has specific length. Len also fails if the object has a type that len() not accept.
require.Len(t, mySlice, 3)
func Lenf ¶
Lenf asserts that the specified object has specific length. Lenf also fails if the object has a type that len() not accept.
require.Lenf(t, mySlice, 3, "error message %s", "formatted")
func Less ¶
func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{})
Less asserts that the first element is less than the second
require.Less(t, 1, 2) require.Less(t, float64(1), float64(2)) require.Less(t, "a", "b")
func LessOrEqual ¶
func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{})
LessOrEqual asserts that the first element is less than or equal to the second
require.LessOrEqual(t, 1, 2) require.LessOrEqual(t, 2, 2) require.LessOrEqual(t, "a", "b") require.LessOrEqual(t, "b", "b")
func LessOrEqualf ¶
LessOrEqualf asserts that the first element is less than or equal to the second
require.LessOrEqualf(t, 1, 2, "error message %s", "formatted") require.LessOrEqualf(t, 2, 2, "error message %s", "formatted") require.LessOrEqualf(t, "a", "b", "error message %s", "formatted") require.LessOrEqualf(t, "b", "b", "error message %s", "formatted")
func Lessf ¶
Lessf asserts that the first element is less than the second
require.Lessf(t, 1, 2, "error message %s", "formatted") require.Lessf(t, float64(1), float64(2), "error message %s", "formatted") require.Lessf(t, "a", "b", "error message %s", "formatted")
func Negative ¶
func Negative(t TestingT, e interface{}, msgAndArgs ...interface{})
Negative asserts that the specified element is negative
require.Negative(t, -1) require.Negative(t, -1.23)
func Negativef ¶
Negativef asserts that the specified element is negative
require.Negativef(t, -1, "error message %s", "formatted") require.Negativef(t, -1.23, "error message %s", "formatted")
func Never ¶
func Never(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{})
Never asserts that the given condition doesn't satisfy in waitFor time, periodically checking the target function each tick.
require.Never(t, func() bool { return false; }, time.Second, 10*time.Millisecond)
func Neverf ¶
func Neverf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{})
Neverf asserts that the given condition doesn't satisfy in waitFor time, periodically checking the target function each tick.
require.Neverf(t, func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted")
func Nil ¶
func Nil(t TestingT, object interface{}, msgAndArgs ...interface{})
Nil asserts that the specified object is nil.
require.Nil(t, err)
func Nilf ¶
Nilf asserts that the specified object is nil.
require.Nilf(t, err, "error message %s", "formatted")
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 NoDirExistsf ¶
NoDirExistsf checks whether a directory does not exist in the given path. It fails if the path points to an existing _directory_ only.
func NoError ¶
NoError asserts that a function returned no error (i.e. `nil`).
actualObj, err := SomeFunction()
if require.NoError(t, err) {
require.Equal(t, expectedObj, actualObj)
}
func NoErrorf ¶
NoErrorf asserts that a function returned no error (i.e. `nil`).
actualObj, err := SomeFunction()
if require.NoErrorf(t, err, "error message %s", "formatted") {
require.Equal(t, expectedObj, actualObj)
}
func NoFileExists ¶
NoFileExists checks whether a file does not exist in a given path. It fails if the path points to an existing _file_ only.
func NoFileExistsf ¶
NoFileExistsf checks whether a file does not exist in a given path. It fails if the path points to an existing _file_ only.
func NotContains ¶
func NotContains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{})
NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element.
require.NotContains(t, "Hello World", "Earth")
require.NotContains(t, ["Hello", "World"], "Earth")
require.NotContains(t, {"Hello": "World"}, "Earth")
func NotContainsf ¶
NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element.
require.NotContainsf(t, "Hello World", "Earth", "error message %s", "formatted")
require.NotContainsf(t, ["Hello", "World"], "Earth", "error message %s", "formatted")
require.NotContainsf(t, {"Hello": "World"}, "Earth", "error message %s", "formatted")
func NotElementsMatch ¶
func NotElementsMatch(t TestingT, listA interface{}, listB interface{}, msgAndArgs ...interface{})
NotElementsMatch asserts that the specified listA(array, slice...) is NOT equal to specified listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, the number of appearances of each of them in both lists should not match. This is an inverse of ElementsMatch.
require.NotElementsMatch(t, [1, 1, 2, 3], [1, 1, 2, 3]) -> false
require.NotElementsMatch(t, [1, 1, 2, 3], [1, 2, 3]) -> true
require.NotElementsMatch(t, [1, 2, 3], [1, 2, 4]) -> true
func NotElementsMatchf ¶
func NotElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{})
NotElementsMatchf asserts that the specified listA(array, slice...) is NOT equal to specified listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, the number of appearances of each of them in both lists should not match. This is an inverse of ElementsMatch.
require.NotElementsMatchf(t, [1, 1, 2, 3], [1, 1, 2, 3], "error message %s", "formatted") -> false
require.NotElementsMatchf(t, [1, 1, 2, 3], [1, 2, 3], "error message %s", "formatted") -> true
require.NotElementsMatchf(t, [1, 2, 3], [1, 2, 4], "error message %s", "formatted") -> true
func NotEmpty ¶
func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{})
NotEmpty asserts that the specified object is NOT Empty.
if require.NotEmpty(t, obj) {
require.Equal(t, "two", obj[1])
}
func NotEmptyf ¶
NotEmptyf asserts that the specified object is NOT Empty.
if require.NotEmptyf(t, obj, "error message %s", "formatted") {
require.Equal(t, "two", obj[1])
}
func NotEqual ¶
func NotEqual(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{})
NotEqual asserts that the specified values are NOT equal.
require.NotEqual(t, obj1, obj2)
Pointer variable equality is determined based on the equality of the referenced values (as opposed to the memory addresses).
func NotEqualValues ¶
func NotEqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{})
NotEqualValues asserts that two objects are not equal even when converted to the same type
require.NotEqualValues(t, obj1, obj2)
func NotEqualValuesf ¶
func NotEqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{})
NotEqualValuesf asserts that two objects are not equal even when converted to the same type
require.NotEqualValuesf(t, obj1, obj2, "error message %s", "formatted")
func NotEqualf ¶
func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{})
NotEqualf asserts that the specified values are NOT equal.
require.NotEqualf(t, obj1, obj2, "error message %s", "formatted")
Pointer variable equality is determined based on the equality of the referenced values (as opposed to the memory addresses).
func NotErrorAs ¶
NotErrorAs asserts that none of the errors in err's chain matches target, but if so, sets target to that error value.
func NotErrorAsf ¶
NotErrorAsf asserts that none of the errors in err's chain matches target, but if so, sets target to that error value.
func NotErrorIs ¶
NotErrorIs asserts that none of the errors in err's chain matches target. This is a wrapper for errors.Is.
func NotErrorIsf ¶
NotErrorIsf asserts that none of the errors in err's chain matches target. This is a wrapper for errors.Is.
func NotImplements ¶
func NotImplements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{})
NotImplements asserts that an object does not implement the specified interface.
require.NotImplements(t, (*MyInterface)(nil), new(MyObject))
func NotImplementsf ¶
func NotImplementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{})
NotImplementsf asserts that an object does not implement the specified interface.
require.NotImplementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted")
func NotNil ¶
func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{})
NotNil asserts that the specified object is not nil.
require.NotNil(t, err)
func NotNilf ¶
NotNilf asserts that the specified object is not nil.
require.NotNilf(t, err, "error message %s", "formatted")
func NotPanics ¶
func NotPanics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{})
NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic.
require.NotPanics(t, func(){ RemainCalm() })
func NotPanicsf ¶
func NotPanicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{})
NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic.
require.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted")
func NotRegexp ¶
func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{})
NotRegexp asserts that a specified regexp does not match a string.
require.NotRegexp(t, regexp.MustCompile("starts"), "it's starting")
require.NotRegexp(t, "^start", "it's not starting")
func NotRegexpf ¶
NotRegexpf asserts that a specified regexp does not match a string.
require.NotRegexpf(t, regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted")
require.NotRegexpf(t, "^start", "it's not starting", "error message %s", "formatted")
func NotSame ¶
func NotSame(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{})
NotSame asserts that two pointers do not reference the same object.
require.NotSame(t, ptr1, ptr2)
Both arguments must be pointer variables. Pointer variable sameness is determined based on the equality of both type and value.
func NotSamef ¶
func NotSamef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{})
NotSamef asserts that two pointers do not reference the same object.
require.NotSamef(t, ptr1, ptr2, "error message %s", "formatted")
Both arguments must be pointer variables. Pointer variable sameness is determined based on the equality of both type and value.
func NotSubset ¶
func NotSubset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{})
NotSubset asserts that the list (array, slice, or map) does NOT contain all elements given in the subset (array, slice, or map). Map elements are key-value pairs unless compared with an array or slice where only the map key is evaluated.
require.NotSubset(t, [1, 3, 4], [1, 2])
require.NotSubset(t, {"x": 1, "y": 2}, {"z": 3})
require.NotSubset(t, [1, 3, 4], {1: "one", 2: "two"})
require.NotSubset(t, {"x": 1, "y": 2}, ["z"])
func NotSubsetf ¶
NotSubsetf asserts that the list (array, slice, or map) does NOT contain all elements given in the subset (array, slice, or map). Map elements are key-value pairs unless compared with an array or slice where only the map key is evaluated.
require.NotSubsetf(t, [1, 3, 4], [1, 2], "error message %s", "formatted")
require.NotSubsetf(t, {"x": 1, "y": 2}, {"z": 3}, "error message %s", "formatted")
require.NotSubsetf(t, [1, 3, 4], {1: "one", 2: "two"}, "error message %s", "formatted")
require.NotSubsetf(t, {"x": 1, "y": 2}, ["z"], "error message %s", "formatted")
func NotZero ¶
func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{})
NotZero asserts that i is not the zero value for its type.
func Panics ¶
func Panics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{})
Panics asserts that the code inside the specified PanicTestFunc panics.
require.Panics(t, func(){ GoCrazy() })
func PanicsWithError ¶
func PanicsWithError(t TestingT, errString string, f assert.PanicTestFunc, msgAndArgs ...interface{})
PanicsWithError asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value is an error that satisfies the EqualError comparison.
require.PanicsWithError(t, "crazy error", func(){ GoCrazy() })
func PanicsWithErrorf ¶
func PanicsWithErrorf(t TestingT, errString string, f assert.PanicTestFunc, msg string, args ...interface{})
PanicsWithErrorf asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value is an error that satisfies the EqualError comparison.
require.PanicsWithErrorf(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted")
func PanicsWithValue ¶
func PanicsWithValue(t TestingT, expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{})
PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value equals the expected panic value.
require.PanicsWithValue(t, "crazy error", func(){ GoCrazy() })
func PanicsWithValuef ¶
func PanicsWithValuef(t TestingT, expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{})
PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value equals the expected panic value.
require.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted")
func Panicsf ¶
func Panicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{})
Panicsf asserts that the code inside the specified PanicTestFunc panics.
require.Panicsf(t, func(){ GoCrazy() }, "error message %s", "formatted")
func Positive ¶
func Positive(t TestingT, e interface{}, msgAndArgs ...interface{})
Positive asserts that the specified element is positive
require.Positive(t, 1) require.Positive(t, 1.23)
func Positivef ¶
Positivef asserts that the specified element is positive
require.Positivef(t, 1, "error message %s", "formatted") require.Positivef(t, 1.23, "error message %s", "formatted")
func Regexp ¶
func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{})
Regexp asserts that a specified regexp matches a string.
require.Regexp(t, regexp.MustCompile("start"), "it's starting")
require.Regexp(t, "start...$", "it's not starting")
func Regexpf ¶
Regexpf asserts that a specified regexp matches a string.
require.Regexpf(t, regexp.MustCompile("start"), "it's starting", "error message %s", "formatted")
require.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted")
func Same ¶
func Same(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{})
Same asserts that two pointers reference the same object.
require.Same(t, ptr1, ptr2)
Both arguments must be pointer variables. Pointer variable sameness is determined based on the equality of both type and value.
func Samef ¶
Samef asserts that two pointers reference the same object.
require.Samef(t, ptr1, ptr2, "error message %s", "formatted")
Both arguments must be pointer variables. Pointer variable sameness is determined based on the equality of both type and value.
func Subset ¶
func Subset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{})
Subset asserts that the list (array, slice, or map) contains all elements given in the subset (array, slice, or map). Map elements are key-value pairs unless compared with an array or slice where only the map key is evaluated.
require.Subset(t, [1, 2, 3], [1, 2])
require.Subset(t, {"x": 1, "y": 2}, {"x": 1})
require.Subset(t, [1, 2, 3], {1: "one", 2: "two"})
require.Subset(t, {"x": 1, "y": 2}, ["x"])
func Subsetf ¶
Subsetf asserts that the list (array, slice, or map) contains all elements given in the subset (array, slice, or map). Map elements are key-value pairs unless compared with an array or slice where only the map key is evaluated.
require.Subsetf(t, [1, 2, 3], [1, 2], "error message %s", "formatted")
require.Subsetf(t, {"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted")
require.Subsetf(t, [1, 2, 3], {1: "one", 2: "two"}, "error message %s", "formatted")
require.Subsetf(t, {"x": 1, "y": 2}, ["x"], "error message %s", "formatted")
func Truef ¶
Truef asserts that the specified value is true.
require.Truef(t, myBool, "error message %s", "formatted")
func WithinDuration ¶
func WithinDuration(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{})
WithinDuration asserts that the two times are within duration delta of each other.
require.WithinDuration(t, time.Now(), time.Now(), 10*time.Second)
func WithinDurationf ¶
func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{})
WithinDurationf asserts that the two times are within duration delta of each other.
require.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted")
func WithinRange ¶
func WithinRange(t TestingT, actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{})
WithinRange asserts that a time is within a time range (inclusive).
require.WithinRange(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second))
func WithinRangef ¶
func WithinRangef(t TestingT, actual time.Time, start time.Time, end time.Time, msg string, args ...interface{})
WithinRangef asserts that a time is within a time range (inclusive).
require.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted")
Types ¶
type Assertions ¶
type Assertions struct {
// contains filtered or unexported fields
}
Assertions provides requirement methods around the TestingT interface.
func New ¶
func New(t TestingT) *Assertions
New makes a new Assertions object for the specified TestingT.
func (*Assertions) Condition ¶
func (a *Assertions) Condition(comp assert.Comparison, msgAndArgs ...interface{})
Condition proxies the package-level Condition assertion.
func (*Assertions) Conditionf ¶
func (a *Assertions) Conditionf(comp assert.Comparison, msg string, args ...interface{})
Conditionf proxies the package-level Conditionf assertion.
func (*Assertions) Contains ¶
func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{})
Contains proxies the package-level Contains assertion.
func (*Assertions) Containsf ¶
func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{})
Containsf proxies the package-level Containsf assertion.
func (*Assertions) DirExists ¶
func (a *Assertions) DirExists(path string, msgAndArgs ...interface{})
DirExists proxies the package-level DirExists assertion.
func (*Assertions) DirExistsf ¶
func (a *Assertions) DirExistsf(path string, msg string, args ...interface{})
DirExistsf proxies the package-level DirExistsf assertion.
func (*Assertions) ElementsMatch ¶
func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{})
ElementsMatch proxies the package-level ElementsMatch assertion.
func (*Assertions) ElementsMatchf ¶
func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{})
ElementsMatchf proxies the package-level ElementsMatchf assertion.
func (*Assertions) Empty ¶
func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{})
Empty proxies the package-level Empty assertion.
func (*Assertions) Emptyf ¶
func (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{})
Emptyf proxies the package-level Emptyf assertion.
func (*Assertions) Equal ¶
func (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{})
Equal proxies the package-level Equal assertion.
func (*Assertions) EqualError ¶
func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{})
EqualError proxies the package-level EqualError assertion.
func (*Assertions) EqualErrorf ¶
func (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{})
EqualErrorf proxies the package-level EqualErrorf assertion.
func (*Assertions) EqualExportedValues ¶
func (a *Assertions) EqualExportedValues(expected interface{}, actual interface{}, msgAndArgs ...interface{})
EqualExportedValues proxies the package-level EqualExportedValues assertion.
func (*Assertions) EqualExportedValuesf ¶
func (a *Assertions) EqualExportedValuesf(expected interface{}, actual interface{}, msg string, args ...interface{})
EqualExportedValuesf proxies the package-level EqualExportedValuesf assertion.
func (*Assertions) EqualValues ¶
func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{})
EqualValues proxies the package-level EqualValues assertion.
func (*Assertions) EqualValuesf ¶
func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{})
EqualValuesf proxies the package-level EqualValuesf assertion.
func (*Assertions) Equalf ¶
func (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string, args ...interface{})
Equalf proxies the package-level Equalf assertion.
func (*Assertions) Error ¶
func (a *Assertions) Error(err error, msgAndArgs ...interface{})
Error proxies the package-level Error assertion.
func (*Assertions) ErrorAs ¶
func (a *Assertions) ErrorAs(err error, target interface{}, msgAndArgs ...interface{})
ErrorAs proxies the package-level ErrorAs assertion.
func (*Assertions) ErrorAsf ¶
func (a *Assertions) ErrorAsf(err error, target interface{}, msg string, args ...interface{})
ErrorAsf proxies the package-level ErrorAsf assertion.
func (*Assertions) ErrorContains ¶
func (a *Assertions) ErrorContains(theError error, contains string, msgAndArgs ...interface{})
ErrorContains proxies the package-level ErrorContains assertion.
func (*Assertions) ErrorContainsf ¶
func (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{})
ErrorContainsf proxies the package-level ErrorContainsf assertion.
func (*Assertions) ErrorIs ¶
func (a *Assertions) ErrorIs(err error, target error, msgAndArgs ...interface{})
ErrorIs proxies the package-level ErrorIs assertion.
func (*Assertions) ErrorIsf ¶
func (a *Assertions) ErrorIsf(err error, target error, msg string, args ...interface{})
ErrorIsf proxies the package-level ErrorIsf assertion.
func (*Assertions) Errorf ¶
func (a *Assertions) Errorf(err error, msg string, args ...interface{})
Errorf proxies the package-level Errorf assertion.
func (*Assertions) Eventually ¶
func (a *Assertions) Eventually(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{})
Eventually proxies the package-level Eventually assertion.
func (*Assertions) EventuallyWithT ¶
func (a *Assertions) EventuallyWithT(condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{})
EventuallyWithT proxies the package-level EventuallyWithT assertion.
func (*Assertions) EventuallyWithTf ¶
func (a *Assertions) EventuallyWithTf(condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{})
EventuallyWithTf proxies the package-level EventuallyWithTf assertion.
func (*Assertions) Eventuallyf ¶
func (a *Assertions) Eventuallyf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{})
Eventuallyf proxies the package-level Eventuallyf assertion.
func (*Assertions) Exactly ¶
func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{})
Exactly proxies the package-level Exactly assertion.
func (*Assertions) Exactlyf ¶
func (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{})
Exactlyf proxies the package-level Exactlyf assertion.
func (*Assertions) Fail ¶
func (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{})
Fail proxies the package-level Fail assertion.
func (*Assertions) FailNow ¶
func (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{})
FailNow proxies the package-level FailNow assertion.
func (*Assertions) FailNowf ¶
func (a *Assertions) FailNowf(failureMessage string, msg string, args ...interface{})
FailNowf proxies the package-level FailNowf assertion.
func (*Assertions) Failf ¶
func (a *Assertions) Failf(failureMessage string, msg string, args ...interface{})
Failf proxies the package-level Failf assertion.
func (*Assertions) False ¶
func (a *Assertions) False(value bool, msgAndArgs ...interface{})
False proxies the package-level False assertion.
func (*Assertions) Falsef ¶
func (a *Assertions) Falsef(value bool, msg string, args ...interface{})
Falsef proxies the package-level Falsef assertion.
func (*Assertions) FileExists ¶
func (a *Assertions) FileExists(path string, msgAndArgs ...interface{})
FileExists proxies the package-level FileExists assertion.
func (*Assertions) FileExistsf ¶
func (a *Assertions) FileExistsf(path string, msg string, args ...interface{})
FileExistsf proxies the package-level FileExistsf assertion.
func (*Assertions) Greater ¶
func (a *Assertions) Greater(e1 interface{}, e2 interface{}, msgAndArgs ...interface{})
Greater proxies the package-level Greater assertion.
func (*Assertions) GreaterOrEqual ¶
func (a *Assertions) GreaterOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{})
GreaterOrEqual proxies the package-level GreaterOrEqual assertion.
func (*Assertions) GreaterOrEqualf ¶
func (a *Assertions) GreaterOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{})
GreaterOrEqualf proxies the package-level GreaterOrEqualf assertion.
func (*Assertions) Greaterf ¶
func (a *Assertions) Greaterf(e1 interface{}, e2 interface{}, msg string, args ...interface{})
Greaterf proxies the package-level Greaterf assertion.
func (*Assertions) HTTPBodyContains ¶
func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{})
HTTPBodyContains proxies the package-level HTTPBodyContains assertion.
func (*Assertions) HTTPBodyContainsf ¶
func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{})
HTTPBodyContainsf proxies the package-level HTTPBodyContainsf assertion.
func (*Assertions) HTTPBodyNotContains ¶
func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{})
HTTPBodyNotContains proxies the package-level HTTPBodyNotContains assertion.
func (*Assertions) HTTPBodyNotContainsf ¶
func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{})
HTTPBodyNotContainsf proxies the package-level HTTPBodyNotContainsf assertion.
func (*Assertions) HTTPError ¶
func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{})
HTTPError proxies the package-level HTTPError assertion.
func (*Assertions) HTTPErrorf ¶
func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{})
HTTPErrorf proxies the package-level HTTPErrorf assertion.
func (*Assertions) HTTPRedirect ¶
func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{})
HTTPRedirect proxies the package-level HTTPRedirect assertion.
func (*Assertions) HTTPRedirectf ¶
func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{})
HTTPRedirectf proxies the package-level HTTPRedirectf assertion.
func (*Assertions) HTTPStatusCode ¶
func (a *Assertions) HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{})
HTTPStatusCode proxies the package-level HTTPStatusCode assertion.
func (*Assertions) HTTPStatusCodef ¶
func (a *Assertions) HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{})
HTTPStatusCodef proxies the package-level HTTPStatusCodef assertion.
func (*Assertions) HTTPSuccess ¶
func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{})
HTTPSuccess proxies the package-level HTTPSuccess assertion.
func (*Assertions) HTTPSuccessf ¶
func (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{})
HTTPSuccessf proxies the package-level HTTPSuccessf assertion.
func (*Assertions) Implements ¶
func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{})
Implements proxies the package-level Implements assertion.
func (*Assertions) Implementsf ¶
func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{})
Implementsf proxies the package-level Implementsf assertion.
func (*Assertions) InDelta ¶
func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{})
InDelta proxies the package-level InDelta assertion.
func (*Assertions) InDeltaMapValues ¶
func (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{})
InDeltaMapValues proxies the package-level InDeltaMapValues assertion.
func (*Assertions) InDeltaMapValuesf ¶
func (a *Assertions) InDeltaMapValuesf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{})
InDeltaMapValuesf proxies the package-level InDeltaMapValuesf assertion.
func (*Assertions) InDeltaSlice ¶
func (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{})
InDeltaSlice proxies the package-level InDeltaSlice assertion.
func (*Assertions) InDeltaSlicef ¶
func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{})
InDeltaSlicef proxies the package-level InDeltaSlicef assertion.
func (*Assertions) InDeltaf ¶
func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{})
InDeltaf proxies the package-level InDeltaf assertion.
func (*Assertions) InEpsilon ¶
func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{})
InEpsilon proxies the package-level InEpsilon assertion.
func (*Assertions) InEpsilonSlice ¶
func (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{})
InEpsilonSlice proxies the package-level InEpsilonSlice assertion.
func (*Assertions) InEpsilonSlicef ¶
func (a *Assertions) InEpsilonSlicef(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{})
InEpsilonSlicef proxies the package-level InEpsilonSlicef assertion.
func (*Assertions) InEpsilonf ¶
func (a *Assertions) InEpsilonf(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{})
InEpsilonf proxies the package-level InEpsilonf assertion.
func (*Assertions) IsDecreasing ¶
func (a *Assertions) IsDecreasing(object interface{}, msgAndArgs ...interface{})
IsDecreasing proxies the package-level IsDecreasing assertion.
func (*Assertions) IsDecreasingf ¶
func (a *Assertions) IsDecreasingf(object interface{}, msg string, args ...interface{})
IsDecreasingf proxies the package-level IsDecreasingf assertion.
func (*Assertions) IsIncreasing ¶
func (a *Assertions) IsIncreasing(object interface{}, msgAndArgs ...interface{})
IsIncreasing proxies the package-level IsIncreasing assertion.
func (*Assertions) IsIncreasingf ¶
func (a *Assertions) IsIncreasingf(object interface{}, msg string, args ...interface{})
IsIncreasingf proxies the package-level IsIncreasingf assertion.
func (*Assertions) IsNonDecreasing ¶
func (a *Assertions) IsNonDecreasing(object interface{}, msgAndArgs ...interface{})
IsNonDecreasing proxies the package-level IsNonDecreasing assertion.
func (*Assertions) IsNonDecreasingf ¶
func (a *Assertions) IsNonDecreasingf(object interface{}, msg string, args ...interface{})
IsNonDecreasingf proxies the package-level IsNonDecreasingf assertion.
func (*Assertions) IsNonIncreasing ¶
func (a *Assertions) IsNonIncreasing(object interface{}, msgAndArgs ...interface{})
IsNonIncreasing proxies the package-level IsNonIncreasing assertion.
func (*Assertions) IsNonIncreasingf ¶
func (a *Assertions) IsNonIncreasingf(object interface{}, msg string, args ...interface{})
IsNonIncreasingf proxies the package-level IsNonIncreasingf assertion.
func (*Assertions) IsNotType ¶
func (a *Assertions) IsNotType(theType interface{}, object interface{}, msgAndArgs ...interface{})
IsNotType proxies the package-level IsNotType assertion.
func (*Assertions) IsNotTypef ¶
func (a *Assertions) IsNotTypef(theType interface{}, object interface{}, msg string, args ...interface{})
IsNotTypef proxies the package-level IsNotTypef assertion.
func (*Assertions) IsType ¶
func (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{})
IsType proxies the package-level IsType assertion.
func (*Assertions) IsTypef ¶
func (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg string, args ...interface{})
IsTypef proxies the package-level IsTypef assertion.
func (*Assertions) JSONEq ¶
func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{})
JSONEq proxies the package-level JSONEq assertion.
func (*Assertions) JSONEqf ¶
func (a *Assertions) JSONEqf(expected string, actual string, msg string, args ...interface{})
JSONEqf proxies the package-level JSONEqf assertion.
func (*Assertions) Len ¶
func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{})
Len proxies the package-level Len assertion.
func (*Assertions) Lenf ¶
func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...interface{})
Lenf proxies the package-level Lenf assertion.
func (*Assertions) Less ¶
func (a *Assertions) Less(e1 interface{}, e2 interface{}, msgAndArgs ...interface{})
Less proxies the package-level Less assertion.
func (*Assertions) LessOrEqual ¶
func (a *Assertions) LessOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{})
LessOrEqual proxies the package-level LessOrEqual assertion.
func (*Assertions) LessOrEqualf ¶
func (a *Assertions) LessOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{})
LessOrEqualf proxies the package-level LessOrEqualf assertion.
func (*Assertions) Lessf ¶
func (a *Assertions) Lessf(e1 interface{}, e2 interface{}, msg string, args ...interface{})
Lessf proxies the package-level Lessf assertion.
func (*Assertions) Negative ¶
func (a *Assertions) Negative(e interface{}, msgAndArgs ...interface{})
Negative proxies the package-level Negative assertion.
func (*Assertions) Negativef ¶
func (a *Assertions) Negativef(e interface{}, msg string, args ...interface{})
Negativef proxies the package-level Negativef assertion.
func (*Assertions) Never ¶
func (a *Assertions) Never(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{})
Never proxies the package-level Never assertion.
func (*Assertions) Neverf ¶
func (a *Assertions) Neverf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{})
Neverf proxies the package-level Neverf assertion.
func (*Assertions) Nil ¶
func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{})
Nil proxies the package-level Nil assertion.
func (*Assertions) Nilf ¶
func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{})
Nilf proxies the package-level Nilf assertion.
func (*Assertions) NoDirExists ¶
func (a *Assertions) NoDirExists(path string, msgAndArgs ...interface{})
NoDirExists proxies the package-level NoDirExists assertion.
func (*Assertions) NoDirExistsf ¶
func (a *Assertions) NoDirExistsf(path string, msg string, args ...interface{})
NoDirExistsf proxies the package-level NoDirExistsf assertion.
func (*Assertions) NoError ¶
func (a *Assertions) NoError(err error, msgAndArgs ...interface{})
NoError proxies the package-level NoError assertion.
func (*Assertions) NoErrorf ¶
func (a *Assertions) NoErrorf(err error, msg string, args ...interface{})
NoErrorf proxies the package-level NoErrorf assertion.
func (*Assertions) NoFileExists ¶
func (a *Assertions) NoFileExists(path string, msgAndArgs ...interface{})
NoFileExists proxies the package-level NoFileExists assertion.
func (*Assertions) NoFileExistsf ¶
func (a *Assertions) NoFileExistsf(path string, msg string, args ...interface{})
NoFileExistsf proxies the package-level NoFileExistsf assertion.
func (*Assertions) NotContains ¶
func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{})
NotContains proxies the package-level NotContains assertion.
func (*Assertions) NotContainsf ¶
func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg string, args ...interface{})
NotContainsf proxies the package-level NotContainsf assertion.
func (*Assertions) NotElementsMatch ¶
func (a *Assertions) NotElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{})
NotElementsMatch proxies the package-level NotElementsMatch assertion.
func (*Assertions) NotElementsMatchf ¶
func (a *Assertions) NotElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{})
NotElementsMatchf proxies the package-level NotElementsMatchf assertion.
func (*Assertions) NotEmpty ¶
func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{})
NotEmpty proxies the package-level NotEmpty assertion.
func (*Assertions) NotEmptyf ¶
func (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface{})
NotEmptyf proxies the package-level NotEmptyf assertion.
func (*Assertions) NotEqual ¶
func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{})
NotEqual proxies the package-level NotEqual assertion.
func (*Assertions) NotEqualValues ¶
func (a *Assertions) NotEqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{})
NotEqualValues proxies the package-level NotEqualValues assertion.
func (*Assertions) NotEqualValuesf ¶
func (a *Assertions) NotEqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{})
NotEqualValuesf proxies the package-level NotEqualValuesf assertion.
func (*Assertions) NotEqualf ¶
func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg string, args ...interface{})
NotEqualf proxies the package-level NotEqualf assertion.
func (*Assertions) NotErrorAs ¶
func (a *Assertions) NotErrorAs(err error, target interface{}, msgAndArgs ...interface{})
NotErrorAs proxies the package-level NotErrorAs assertion.
func (*Assertions) NotErrorAsf ¶
func (a *Assertions) NotErrorAsf(err error, target interface{}, msg string, args ...interface{})
NotErrorAsf proxies the package-level NotErrorAsf assertion.
func (*Assertions) NotErrorIs ¶
func (a *Assertions) NotErrorIs(err error, target error, msgAndArgs ...interface{})
NotErrorIs proxies the package-level NotErrorIs assertion.
func (*Assertions) NotErrorIsf ¶
func (a *Assertions) NotErrorIsf(err error, target error, msg string, args ...interface{})
NotErrorIsf proxies the package-level NotErrorIsf assertion.
func (*Assertions) NotImplements ¶
func (a *Assertions) NotImplements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{})
NotImplements proxies the package-level NotImplements assertion.
func (*Assertions) NotImplementsf ¶
func (a *Assertions) NotImplementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{})
NotImplementsf proxies the package-level NotImplementsf assertion.
func (*Assertions) NotNil ¶
func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{})
NotNil proxies the package-level NotNil assertion.
func (*Assertions) NotNilf ¶
func (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{})
NotNilf proxies the package-level NotNilf assertion.
func (*Assertions) NotPanics ¶
func (a *Assertions) NotPanics(f assert.PanicTestFunc, msgAndArgs ...interface{})
NotPanics proxies the package-level NotPanics assertion.
func (*Assertions) NotPanicsf ¶
func (a *Assertions) NotPanicsf(f assert.PanicTestFunc, msg string, args ...interface{})
NotPanicsf proxies the package-level NotPanicsf assertion.
func (*Assertions) NotRegexp ¶
func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{})
NotRegexp proxies the package-level NotRegexp assertion.
func (*Assertions) NotRegexpf ¶
func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{})
NotRegexpf proxies the package-level NotRegexpf assertion.
func (*Assertions) NotSame ¶
func (a *Assertions) NotSame(expected interface{}, actual interface{}, msgAndArgs ...interface{})
NotSame proxies the package-level NotSame assertion.
func (*Assertions) NotSamef ¶
func (a *Assertions) NotSamef(expected interface{}, actual interface{}, msg string, args ...interface{})
NotSamef proxies the package-level NotSamef assertion.
func (*Assertions) NotSubset ¶
func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{})
NotSubset proxies the package-level NotSubset assertion.
func (*Assertions) NotSubsetf ¶
func (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{})
NotSubsetf proxies the package-level NotSubsetf assertion.
func (*Assertions) NotZero ¶
func (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{})
NotZero proxies the package-level NotZero assertion.
func (*Assertions) NotZerof ¶
func (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{})
NotZerof proxies the package-level NotZerof assertion.
func (*Assertions) Panics ¶
func (a *Assertions) Panics(f assert.PanicTestFunc, msgAndArgs ...interface{})
Panics proxies the package-level Panics assertion.
func (*Assertions) PanicsWithError ¶
func (a *Assertions) PanicsWithError(errString string, f assert.PanicTestFunc, msgAndArgs ...interface{})
PanicsWithError proxies the package-level PanicsWithError assertion.
func (*Assertions) PanicsWithErrorf ¶
func (a *Assertions) PanicsWithErrorf(errString string, f assert.PanicTestFunc, msg string, args ...interface{})
PanicsWithErrorf proxies the package-level PanicsWithErrorf assertion.
func (*Assertions) PanicsWithValue ¶
func (a *Assertions) PanicsWithValue(expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{})
PanicsWithValue proxies the package-level PanicsWithValue assertion.
func (*Assertions) PanicsWithValuef ¶
func (a *Assertions) PanicsWithValuef(expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{})
PanicsWithValuef proxies the package-level PanicsWithValuef assertion.
func (*Assertions) Panicsf ¶
func (a *Assertions) Panicsf(f assert.PanicTestFunc, msg string, args ...interface{})
Panicsf proxies the package-level Panicsf assertion.
func (*Assertions) Positive ¶
func (a *Assertions) Positive(e interface{}, msgAndArgs ...interface{})
Positive proxies the package-level Positive assertion.
func (*Assertions) Positivef ¶
func (a *Assertions) Positivef(e interface{}, msg string, args ...interface{})
Positivef proxies the package-level Positivef assertion.
func (*Assertions) Regexp ¶
func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{})
Regexp proxies the package-level Regexp assertion.
func (*Assertions) Regexpf ¶
func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{})
Regexpf proxies the package-level Regexpf assertion.
func (*Assertions) Same ¶
func (a *Assertions) Same(expected interface{}, actual interface{}, msgAndArgs ...interface{})
Same proxies the package-level Same assertion.
func (*Assertions) Samef ¶
func (a *Assertions) Samef(expected interface{}, actual interface{}, msg string, args ...interface{})
Samef proxies the package-level Samef assertion.
func (*Assertions) Subset ¶
func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{})
Subset proxies the package-level Subset assertion.
func (*Assertions) Subsetf ¶
func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{})
Subsetf proxies the package-level Subsetf assertion.
func (*Assertions) True ¶
func (a *Assertions) True(value bool, msgAndArgs ...interface{})
True proxies the package-level True assertion.
func (*Assertions) Truef ¶
func (a *Assertions) Truef(value bool, msg string, args ...interface{})
Truef proxies the package-level Truef assertion.
func (*Assertions) WithinDuration ¶
func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{})
WithinDuration proxies the package-level WithinDuration assertion.
func (*Assertions) WithinDurationf ¶
func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{})
WithinDurationf proxies the package-level WithinDurationf assertion.
func (*Assertions) WithinRange ¶
func (a *Assertions) WithinRange(actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{})
WithinRange proxies the package-level WithinRange assertion.
func (*Assertions) WithinRangef ¶
func (a *Assertions) WithinRangef(actual time.Time, start time.Time, end time.Time, msg string, args ...interface{})
WithinRangef proxies the package-level WithinRangef assertion.
func (*Assertions) YAMLEq ¶
func (a *Assertions) YAMLEq(expected string, actual string, msgAndArgs ...interface{})
YAMLEq proxies the package-level YAMLEq assertion.
func (*Assertions) YAMLEqf ¶
func (a *Assertions) YAMLEqf(expected string, actual string, msg string, args ...interface{})
YAMLEqf proxies the package-level YAMLEqf assertion.
func (*Assertions) Zero ¶
func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{})
Zero proxies the package-level Zero assertion.
func (*Assertions) Zerof ¶
func (a *Assertions) Zerof(i interface{}, msg string, args ...interface{})
Zerof proxies the package-level Zerof assertion.
type BoolAssertionFunc ¶
type BoolAssertionFunc = upstream.BoolAssertionFunc
BoolAssertionFunc is an alias for testify's bool requirement function type.
type ComparisonAssertionFunc ¶
type ComparisonAssertionFunc = upstream.ComparisonAssertionFunc
ComparisonAssertionFunc is an alias for testify's comparison requirement function type.
type ErrorAssertionFunc ¶
type ErrorAssertionFunc = upstream.ErrorAssertionFunc
ErrorAssertionFunc is an alias for testify's error requirement function type.
type ValueAssertionFunc ¶
type ValueAssertionFunc = upstream.ValueAssertionFunc
ValueAssertionFunc is an alias for testify's value requirement function type.