Versions in this module Expand all Collapse all v1 v1.0.0 Dec 1, 2021 Changes in this version + var AnError = errors.New("assert.AnError general error for testing") + func CallerInfo() []string + func Condition(t TestingT, comp Comparison, msgAndArgs ...interface{}) + func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) + func DiffValues(a, b interface{}) string + func DiffValuesDefault(a, b interface{}) string + func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) + func Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) + func EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) + func EqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) + func Error(t TestingT, err error, msgAndArgs ...interface{}) + func Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) + func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) + func False(t TestingT, value bool, msgAndArgs ...interface{}) + func HTTPBody(handler http.HandlerFunc, method, url string, values url.Values) string + func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, ...) bool + func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, ...) bool + func HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values url.Values) bool + func HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, values url.Values) bool + func HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, values url.Values) bool + func Implements(t TestingT, interfaceObject interface{}, object interface{}, ...) + func InDelta(t TestingT, expected, actual interface{}, delta float64, ...) + func InDeltaSlice(t TestingT, expected, actual interface{}, delta float64, ...) + func InEpsilon(t TestingT, expected, actual interface{}, epsilon float64, ...) + func InEpsilonSlice(t TestingT, expected, actual interface{}, delta float64, ...) + func IsType(t TestingT, expectedType interface{}, object interface{}, ...) + func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) + func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) + func NoError(t TestingT, err error, msgAndArgs ...interface{}) + func NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) + func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) + func NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) + func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) + func NotPanics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) + func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) + func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) + func ObjectsAreEqual(expected, actual interface{}) bool + func ObjectsAreEqualValues(expected, actual interface{}) bool + func Panics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) + func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) + func True(t TestingT, value bool, msgAndArgs ...interface{}) + func WithinDuration(t TestingT, expected, actual time.Time, delta time.Duration, ...) + func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) + type Assertions struct + func New(t TestingT) *Assertions + func (a *Assertions) Condition(comp Comparison, msgAndArgs ...interface{}) + func (a *Assertions) Contains(s, contains interface{}, msgAndArgs ...interface{}) + func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) + func (a *Assertions) Equal(expected, actual interface{}, msgAndArgs ...interface{}) + func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) + func (a *Assertions) EqualValues(expected, actual interface{}, msgAndArgs ...interface{}) + func (a *Assertions) Error(theError error, msgAndArgs ...interface{}) + func (a *Assertions) Exactly(expected, actual interface{}, msgAndArgs ...interface{}) + func (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) + func (a *Assertions) False(value bool, msgAndArgs ...interface{}) + func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method, url string, values url.Values, ...) bool + func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method, url string, values url.Values, ...) bool + func (a *Assertions) HTTPError(handler http.HandlerFunc, method, url string, values url.Values) bool + func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method, url string, values url.Values) bool + func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method, url string, values url.Values) bool + func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) + func (a *Assertions) InDelta(expected, actual interface{}, delta float64, msgAndArgs ...interface{}) + func (a *Assertions) InEpsilon(expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) + func (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) + func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) + func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) + func (a *Assertions) NoError(theError error, msgAndArgs ...interface{}) + func (a *Assertions) NotContains(s, contains interface{}, msgAndArgs ...interface{}) + func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) + func (a *Assertions) NotEqual(expected, actual interface{}, msgAndArgs ...interface{}) + func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) + func (a *Assertions) NotPanics(f PanicTestFunc, msgAndArgs ...interface{}) + func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) + func (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) + func (a *Assertions) Panics(f PanicTestFunc, msgAndArgs ...interface{}) + func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) + func (a *Assertions) True(value bool, msgAndArgs ...interface{}) + func (a *Assertions) WithinDuration(expected, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) + func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) + type Comparison func() (success bool) + type PanicTestFunc func() + type TestingT interface + Errorf func(format string, args ...interface{}) + FailNow func() Other modules containing this package github.com/alecthomas/assert/v2