Documentation
¶
Overview ¶
Package assert provides testify-compatible assertions with go-cmp equality.
Code generated by go generate; DO NOT EDIT.
Index ¶
- Variables
- func CallerInfo() []string
- func Condition(t TestingT, comp Comparison, msgAndArgs ...interface{}) bool
- func Conditionf(t TestingT, comp Comparison, msg string, args ...interface{}) bool
- func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool
- func Containsf(t TestingT, s interface{}, contains interface{}, msg string, ...) bool
- func DirExists(t TestingT, path string, msgAndArgs ...interface{}) bool
- func DirExistsf(t TestingT, path string, msg string, args ...interface{}) bool
- func ElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interface{}) (ok bool)
- func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, ...) bool
- func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool
- func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool
- func Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool
- func EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) bool
- func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) bool
- func EqualExportedValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool
- func EqualExportedValuesf(t TestingT, expected interface{}, actual interface{}, msg string, ...) bool
- func EqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool
- func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, ...) bool
- func EqualWithOptions(t TestingT, expected, actual interface{}, opts []cmp.Option, ...) bool
- func Equalf(t TestingT, expected, actual interface{}, msg string, args ...interface{}) bool
- func Error(t TestingT, err error, msgAndArgs ...interface{}) bool
- func ErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{}) bool
- func ErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) bool
- func ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...interface{}) bool
- func ErrorContainsf(t TestingT, theError error, contains string, msg string, args ...interface{}) bool
- func ErrorIs(t TestingT, err, target error, msgAndArgs ...interface{}) bool
- func ErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) bool
- func Errorf(t TestingT, err error, msg string, args ...interface{}) bool
- func Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, ...) bool
- func EventuallyWithT(t TestingT, condition func(collect *CollectT), waitFor time.Duration, ...) bool
- func EventuallyWithTf(t TestingT, condition func(collect *CollectT), waitFor time.Duration, ...) bool
- func Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, ...) bool
- func Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool
- func Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, ...) bool
- func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool
- func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool
- func FailNowf(t TestingT, failureMessage string, msg string, args ...interface{}) bool
- func Failf(t TestingT, failureMessage string, msg string, args ...interface{}) bool
- func False(t TestingT, value bool, msgAndArgs ...interface{}) bool
- func Falsef(t TestingT, value bool, msg string, args ...interface{}) bool
- func FileExists(t TestingT, path string, msgAndArgs ...interface{}) bool
- func FileExistsf(t TestingT, path string, msg string, args ...interface{}) bool
- func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool
- func GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool
- func GreaterOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool
- func Greaterf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool
- 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 HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, ...) bool
- func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, ...) bool
- func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, ...) bool
- func HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, ...) bool
- func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, ...) bool
- func HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, ...) bool
- func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, ...) bool
- func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, ...) bool
- func HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url string, ...) bool
- func HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, ...) bool
- func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, ...) bool
- func Implements(t TestingT, interfaceObject interface{}, object interface{}, ...) bool
- func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, ...) bool
- func InDelta(t TestingT, expected, actual interface{}, delta float64, ...) bool
- func InDeltaMapValues(t TestingT, expected, actual interface{}, delta float64, ...) bool
- func InDeltaMapValuesf(t TestingT, expected interface{}, actual interface{}, delta float64, ...) bool
- func InDeltaSlice(t TestingT, expected, actual interface{}, delta float64, ...) bool
- func InDeltaSlicef(t TestingT, expected interface{}, actual interface{}, delta float64, ...) bool
- func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, ...) bool
- func InEpsilon(t TestingT, expected, actual interface{}, epsilon float64, ...) bool
- func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, ...) bool
- func InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsilon float64, ...) bool
- func InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon float64, ...) bool
- func IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool
- func IsDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool
- func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool
- func IsIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool
- func IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool
- func IsNonDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool
- func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool
- func IsNonIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool
- func IsNotType(t TestingT, theType, object interface{}, msgAndArgs ...interface{}) bool
- func IsNotTypef(t TestingT, theType interface{}, object interface{}, msg string, ...) bool
- func IsType(t TestingT, expectedType, object interface{}, msgAndArgs ...interface{}) bool
- func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg string, ...) bool
- func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool
- func JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool
- func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) bool
- func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) bool
- func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool
- func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool
- func LessOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool
- func Lessf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool
- func Negative(t TestingT, e interface{}, msgAndArgs ...interface{}) bool
- func Negativef(t TestingT, e interface{}, msg string, args ...interface{}) bool
- func Never(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, ...) bool
- func Neverf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, ...) bool
- func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool
- func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) bool
- func NoDirExists(t TestingT, path string, msgAndArgs ...interface{}) bool
- func NoDirExistsf(t TestingT, path string, msg string, args ...interface{}) bool
- func NoError(t TestingT, err error, msgAndArgs ...interface{}) bool
- func NoErrorf(t TestingT, err error, msg string, args ...interface{}) bool
- func NoFileExists(t TestingT, path string, msgAndArgs ...interface{}) bool
- func NoFileExistsf(t TestingT, path string, msg string, args ...interface{}) bool
- func NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool
- func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, ...) bool
- func NotElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interface{}) (ok bool)
- func NotElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, ...) bool
- func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool
- func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool
- func NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool
- func NotEqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool
- func NotEqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, ...) bool
- func NotEqualWithOptions(t TestingT, expected, actual interface{}, opts []cmp.Option, ...) bool
- func NotEqualf(t TestingT, expected, actual interface{}, msg string, args ...interface{}) bool
- func NotErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{}) bool
- func NotErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) bool
- func NotErrorIs(t TestingT, err, target error, msgAndArgs ...interface{}) bool
- func NotErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) bool
- func NotImplements(t TestingT, interfaceObject interface{}, object interface{}, ...) bool
- func NotImplementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, ...) bool
- func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool
- func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) bool
- func NotPanics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool
- func NotPanicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool
- func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool
- func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool
- func NotSame(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool
- func NotSamef(t TestingT, expected interface{}, actual interface{}, msg string, ...) bool
- func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool)
- func NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, ...) bool
- func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool
- func NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) bool
- func ObjectsAreEqual(expected, actual interface{}) bool
- func ObjectsAreEqualValues(expected, actual interface{}) bool
- func ObjectsExportedFieldsAreEqual(expected, actual interface{}) bool
- func Panics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool
- func PanicsWithError(t TestingT, errString string, f PanicTestFunc, msgAndArgs ...interface{}) bool
- func PanicsWithErrorf(t TestingT, errString string, f PanicTestFunc, msg string, args ...interface{}) bool
- func PanicsWithValue(t TestingT, expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool
- func PanicsWithValuef(t TestingT, expected interface{}, f PanicTestFunc, msg string, ...) bool
- func Panicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool
- func Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) bool
- func Positivef(t TestingT, e interface{}, msg string, args ...interface{}) bool
- func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool
- func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool
- func Same(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool
- func Samef(t TestingT, expected interface{}, actual interface{}, msg string, ...) bool
- func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool)
- func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, ...) bool
- func True(t TestingT, value bool, msgAndArgs ...interface{}) bool
- func Truef(t TestingT, value bool, msg string, args ...interface{}) bool
- func WithinDuration(t TestingT, expected, actual time.Time, delta time.Duration, ...) bool
- func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, ...) bool
- func WithinRange(t TestingT, actual, start, end time.Time, msgAndArgs ...interface{}) bool
- func WithinRangef(t TestingT, actual time.Time, start time.Time, end time.Time, msg string, ...) bool
- func YAMLEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool
- func YAMLEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool
- func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool
- func Zerof(t TestingT, i interface{}, msg string, args ...interface{}) bool
- type Assertions
- func (a *Assertions) Equal(expected, actual interface{}, msgAndArgs ...interface{}) bool
- func (a *Assertions) Equalf(expected, actual interface{}, msg string, args ...interface{}) bool
- func (a *Assertions) NotEqual(expected, actual interface{}, msgAndArgs ...interface{}) bool
- func (a *Assertions) NotEqualf(expected, actual interface{}, msg string, args ...interface{}) bool
- type BoolAssertionFunc
- type CollectT
- type CompareType
- type Comparison
- type ComparisonAssertionFunc
- type ErrorAssertionFunc
- type PanicAssertionFunc
- type PanicTestFunc
- type TestingT
- type ValueAssertionFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var AnError = upstream.AnError
Functions ¶
func CallerInfo ¶
func CallerInfo() []string
func Condition ¶
func Condition(t TestingT, comp Comparison, msgAndArgs ...interface{}) bool
func Conditionf ¶
func Conditionf(t TestingT, comp Comparison, msg string, args ...interface{}) bool
func ElementsMatch ¶
func ElementsMatchf ¶
func EqualError ¶
func EqualErrorf ¶
func EqualExportedValues ¶
func EqualExportedValuesf ¶
func EqualValues ¶
func EqualValuesf ¶
func EqualWithOptions ¶
func EqualWithOptions(t TestingT, expected, actual interface{}, opts []cmp.Option, msgAndArgs ...interface{}) bool
EqualWithOptions accepts explicit go-cmp options without changing Equal's signature.
func ErrorContains ¶
func ErrorContainsf ¶
func Eventually ¶
func EventuallyWithT ¶
func EventuallyWithTf ¶
func Eventuallyf ¶
func FileExists ¶
func GreaterOrEqual ¶
func GreaterOrEqualf ¶
func HTTPBodyContains ¶
func HTTPBodyContainsf ¶
func HTTPBodyNotContains ¶
func HTTPBodyNotContainsf ¶
func HTTPErrorf ¶
func HTTPRedirect ¶
func HTTPRedirectf ¶
func HTTPStatusCode ¶
func HTTPStatusCodef ¶
func HTTPSuccess ¶
func HTTPSuccessf ¶
func Implements ¶
func Implementsf ¶
func InDeltaMapValues ¶
func InDeltaMapValuesf ¶
func InDeltaSlice ¶
func InDeltaSlicef ¶
func InEpsilonSlice ¶
func InEpsilonSlicef ¶
func InEpsilonf ¶
func IsDecreasing ¶
func IsDecreasingf ¶
func IsIncreasing ¶
func IsIncreasingf ¶
func IsNonDecreasing ¶
func IsNonDecreasingf ¶
func IsNonIncreasing ¶
func IsNonIncreasingf ¶
func IsNotTypef ¶
func LessOrEqual ¶
func LessOrEqualf ¶
func NoDirExists ¶
func NoDirExistsf ¶
func NoFileExists ¶
func NoFileExistsf ¶
func NotContains ¶
func NotContainsf ¶
func NotElementsMatch ¶
func NotElementsMatchf ¶
func NotEqualValues ¶
func NotEqualValuesf ¶
func NotEqualWithOptions ¶
func NotErrorAs ¶
func NotErrorAsf ¶
func NotErrorIs ¶
func NotErrorIsf ¶
func NotImplements ¶
func NotImplementsf ¶
func NotPanics ¶
func NotPanics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool
func NotPanicsf ¶
func NotPanicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool
func NotRegexpf ¶
func NotSubsetf ¶
func ObjectsAreEqual ¶
func ObjectsAreEqual(expected, actual interface{}) bool
func ObjectsAreEqualValues ¶
func ObjectsAreEqualValues(expected, actual interface{}) bool
func ObjectsExportedFieldsAreEqual ¶
func ObjectsExportedFieldsAreEqual(expected, actual interface{}) bool
func Panics ¶
func Panics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool
func PanicsWithError ¶
func PanicsWithError(t TestingT, errString string, f PanicTestFunc, msgAndArgs ...interface{}) bool
func PanicsWithErrorf ¶
func PanicsWithErrorf(t TestingT, errString string, f PanicTestFunc, msg string, args ...interface{}) bool
func PanicsWithValue ¶
func PanicsWithValue(t TestingT, expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool
func PanicsWithValuef ¶
func PanicsWithValuef(t TestingT, expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool
func WithinDuration ¶
func WithinDurationf ¶
func WithinRange ¶
func WithinRangef ¶
Types ¶
type Assertions ¶
type Assertions struct {
*testify.Assertions
// contains filtered or unexported fields
}
Assertions preserves testify's methods and overrides Equal and NotEqual.
func New ¶
func New(t TestingT) *Assertions
func NewWithOptions ¶
func NewWithOptions(t TestingT, opts ...cmp.Option) *Assertions
NewWithOptions applies comparison options to this instance's equality methods. Other methods retain testify's behavior.
func (*Assertions) Equal ¶
func (a *Assertions) Equal(expected, actual interface{}, msgAndArgs ...interface{}) bool
func (*Assertions) Equalf ¶
func (a *Assertions) Equalf(expected, actual interface{}, msg string, args ...interface{}) bool
func (*Assertions) NotEqual ¶
func (a *Assertions) NotEqual(expected, actual interface{}, msgAndArgs ...interface{}) bool
func (*Assertions) NotEqualf ¶
func (a *Assertions) NotEqualf(expected, actual interface{}, msg string, args ...interface{}) bool
type BoolAssertionFunc ¶
type BoolAssertionFunc = upstream.BoolAssertionFunc
type CompareType ¶
type CompareType = upstream.CompareType
type Comparison ¶
type Comparison = upstream.Comparison
type ComparisonAssertionFunc ¶
type ComparisonAssertionFunc = upstream.ComparisonAssertionFunc
type ErrorAssertionFunc ¶
type ErrorAssertionFunc = upstream.ErrorAssertionFunc
type PanicAssertionFunc ¶
type PanicAssertionFunc = upstream.PanicAssertionFunc
type PanicTestFunc ¶
type PanicTestFunc = upstream.PanicTestFunc
type ValueAssertionFunc ¶
type ValueAssertionFunc = upstream.ValueAssertionFunc
Click to show internal directories.
Click to hide internal directories.