MCPcopy Create free account

hub / github.com/stretchr/testify / functions

Functions1,305 in github.com/stretchr/testify

MethodIsIncreasing
IsIncreasing asserts that the collection is increasing a.IsIncreasing([]int{1, 2, 3}) a.IsIncreasing([]float{1, 2}) a.IsIncreasing([]string{"a", "
assert/assertion_forward.go:804
MethodIsIncreasing
IsIncreasing asserts that the collection is increasing a.IsIncreasing([]int{1, 2, 3}) a.IsIncreasing([]float{1, 2}) a.IsIncreasing([]string{"a", "
require/require_forward.go:805
MethodIsIncreasingf
IsIncreasingf asserts that the collection is increasing a.IsIncreasingf([]int{1, 2, 3}, "error message %s", "formatted") a.IsIncreasingf([]float{1,
assert/assertion_forward.go:816
MethodIsIncreasingf
IsIncreasingf asserts that the collection is increasing a.IsIncreasingf([]int{1, 2, 3}, "error message %s", "formatted") a.IsIncreasingf([]float{1,
require/require_forward.go:817
MethodIsNonDecreasing
IsNonDecreasing asserts that the collection is not decreasing a.IsNonDecreasing([]int{1, 1, 2}) a.IsNonDecreasing([]float{1, 2}) a.IsNonDecreasing
assert/assertion_forward.go:828
MethodIsNonDecreasing
IsNonDecreasing asserts that the collection is not decreasing a.IsNonDecreasing([]int{1, 1, 2}) a.IsNonDecreasing([]float{1, 2}) a.IsNonDecreasing
require/require_forward.go:829
MethodIsNonDecreasingf
IsNonDecreasingf asserts that the collection is not decreasing a.IsNonDecreasingf([]int{1, 1, 2}, "error message %s", "formatted") a.IsNonDecreasin
assert/assertion_forward.go:840
MethodIsNonDecreasingf
IsNonDecreasingf asserts that the collection is not decreasing a.IsNonDecreasingf([]int{1, 1, 2}, "error message %s", "formatted") a.IsNonDecreasin
require/require_forward.go:841
MethodIsNonIncreasing
IsNonIncreasing asserts that the collection is not increasing a.IsNonIncreasing([]int{2, 1, 1}) a.IsNonIncreasing([]float{2, 1}) a.IsNonIncreasing
assert/assertion_forward.go:852
MethodIsNonIncreasing
IsNonIncreasing asserts that the collection is not increasing a.IsNonIncreasing([]int{2, 1, 1}) a.IsNonIncreasing([]float{2, 1}) a.IsNonIncreasing
require/require_forward.go:853
MethodIsNonIncreasingf
IsNonIncreasingf asserts that the collection is not increasing a.IsNonIncreasingf([]int{2, 1, 1}, "error message %s", "formatted") a.IsNonIncreasin
assert/assertion_forward.go:864
MethodIsNonIncreasingf
IsNonIncreasingf asserts that the collection is not increasing a.IsNonIncreasingf([]int{2, 1, 1}, "error message %s", "formatted") a.IsNonIncreasin
require/require_forward.go:865
MethodIsTypef
IsTypef asserts that the specified objects are of the same type.
assert/assertion_forward.go:880
MethodIsTypef
IsTypef asserts that the specified objects are of the same type.
require/require_forward.go:881
MethodJSONEqf
JSONEqf asserts that two JSON strings are equivalent. a.JSONEqf(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error messa
assert/assertion_forward.go:900
MethodJSONEqf
JSONEqf asserts that two JSON strings are equivalent. a.JSONEqf(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error messa
require/require_forward.go:901
MethodLenf
Lenf asserts that the specified object has specific length. Lenf also fails if the object has a type that len() not accept. a.Lenf(mySlice, 3, "erro
assert/assertion_forward.go:922
MethodLenf
Lenf asserts that the specified object has specific length. Lenf also fails if the object has a type that len() not accept. a.Lenf(mySlice, 3, "erro
require/require_forward.go:923
MethodLess
Less asserts that the first element is less than the second a.Less(1, 2) a.Less(float64(1), float64(2)) a.Less("a", "b")
assert/assertion_forward.go:934
MethodLess
Less asserts that the first element is less than the second a.Less(1, 2) a.Less(float64(1), float64(2)) a.Less("a", "b")
require/require_forward.go:935
MethodLessOrEqual
LessOrEqual asserts that the first element is less than or equal to the second a.LessOrEqual(1, 2) a.LessOrEqual(2, 2) a.LessOrEqual("a", "b") a.
assert/assertion_forward.go:947
MethodLessOrEqual
LessOrEqual asserts that the first element is less than or equal to the second a.LessOrEqual(1, 2) a.LessOrEqual(2, 2) a.LessOrEqual("a", "b") a.
require/require_forward.go:948
MethodLessOrEqualf
LessOrEqualf asserts that the first element is less than or equal to the second a.LessOrEqualf(1, 2, "error message %s", "formatted") a.LessOrEqual
assert/assertion_forward.go:960
MethodLessOrEqualf
LessOrEqualf asserts that the first element is less than or equal to the second a.LessOrEqualf(1, 2, "error message %s", "formatted") a.LessOrEqual
require/require_forward.go:961
MethodLessf
Lessf asserts that the first element is less than the second a.Lessf(1, 2, "error message %s", "formatted") a.Lessf(float64(1), float64(2), "error
assert/assertion_forward.go:972
MethodLessf
Lessf asserts that the first element is less than the second a.Lessf(1, 2, "error message %s", "formatted") a.Lessf(float64(1), float64(2), "error
require/require_forward.go:973
MethodLogf
(string, ...interface{})
mock/mock_test.go:137
MethodLogf
(format string, args ...interface{})
mock/mock_test.go:2036
MethodName
()
assert/assertions_test.go:2756
MethodNegative
Negative asserts that the specified element is negative a.Negative(-1) a.Negative(-1.23)
assert/assertion_forward.go:983
MethodNegative
Negative asserts that the specified element is negative a.Negative(-1) a.Negative(-1.23)
require/require_forward.go:984
MethodNegativef
Negativef asserts that the specified element is negative a.Negativef(-1, "error message %s", "formatted") a.Negativef(-1.23, "error message %s", "f
assert/assertion_forward.go:994
MethodNegativef
Negativef asserts that the specified element is negative a.Negativef(-1, "error message %s", "formatted") a.Negativef(-1.23, "error message %s", "f
require/require_forward.go:995
MethodNever
Never asserts that the given condition doesn't satisfy in waitFor time, periodically checking the target function each tick. a.Never(func() bool { r
assert/assertion_forward.go:1005
MethodNever
Never asserts that the given condition doesn't satisfy in waitFor time, periodically checking the target function each tick. a.Never(func() bool { r
require/require_forward.go:1006
MethodNeverf
Neverf asserts that the given condition doesn't satisfy in waitFor time, periodically checking the target function each tick. a.Neverf(func() bool {
assert/assertion_forward.go:1016
MethodNeverf
Neverf asserts that the given condition doesn't satisfy in waitFor time, periodically checking the target function each tick. a.Neverf(func() bool {
require/require_forward.go:1017
MethodNilf
Nilf asserts that the specified object is nil. a.Nilf(err, "error message %s", "formatted")
assert/assertion_forward.go:1036
MethodNilf
Nilf asserts that the specified object is nil. a.Nilf(err, "error message %s", "formatted")
require/require_forward.go:1037
MethodNoDirExists
NoDirExists checks whether a directory does not exist in the given path. It fails if the path points to an existing _directory_ only.
assert/assertion_forward.go:1045
MethodNoDirExists
NoDirExists checks whether a directory does not exist in the given path. It fails if the path points to an existing _directory_ only.
require/require_forward.go:1046
MethodNoDirExistsf
NoDirExistsf checks whether a directory does not exist in the given path. It fails if the path points to an existing _directory_ only.
assert/assertion_forward.go:1054
MethodNoDirExistsf
NoDirExistsf checks whether a directory does not exist in the given path. It fails if the path points to an existing _directory_ only.
require/require_forward.go:1055
MethodNoErrorf
NoErrorf asserts that a function returned no error (i.e. `nil`). actualObj, err := SomeFunction() if a.NoErrorf(err, "error message %s", "forma
assert/assertion_forward.go:1080
MethodNoErrorf
NoErrorf asserts that a function returned no error (i.e. `nil`). actualObj, err := SomeFunction() if a.NoErrorf(err, "error message %s", "forma
require/require_forward.go:1081
MethodNoFileExists
NoFileExists checks whether a file does not exist in a given path. It fails if the path points to an existing _file_ only.
assert/assertion_forward.go:1089
MethodNoFileExists
NoFileExists checks whether a file does not exist in a given path. It fails if the path points to an existing _file_ only.
require/require_forward.go:1090
MethodNoFileExistsf
NoFileExistsf checks whether a file does not exist in a given path. It fails if the path points to an existing _file_ only.
assert/assertion_forward.go:1098
MethodNoFileExistsf
NoFileExistsf checks whether a file does not exist in a given path. It fails if the path points to an existing _file_ only.
require/require_forward.go:1099
MethodNonTestMethod
NonTestMethod does not begin with "Test", so it will not be run by testify as a test in the suite. This is useful for creating helper methods for you
suite/suite_test.go:238
MethodNonTestMethod
()
suite/suite_test.go:390
MethodNotContainsf
NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element. a.NotContainsf("He
assert/assertion_forward.go:1124
MethodNotContainsf
NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element. a.NotContainsf("He
require/require_forward.go:1125
MethodNotElementsMatch
NotElementsMatch asserts that the specified listA(array, slice...) is NOT equal to specified listB(array, slice...) ignoring the order of the elements
assert/assertion_forward.go:1141
MethodNotElementsMatch
NotElementsMatch asserts that the specified listA(array, slice...) is NOT equal to specified listB(array, slice...) ignoring the order of the elements
require/require_forward.go:1142
MethodNotElementsMatchf
NotElementsMatchf asserts that the specified listA(array, slice...) is NOT equal to specified listB(array, slice...) ignoring the order of the element
assert/assertion_forward.go:1158
MethodNotElementsMatchf
NotElementsMatchf asserts that the specified listA(array, slice...) is NOT equal to specified listB(array, slice...) ignoring the order of the element
require/require_forward.go:1159
MethodNotEmptyf
NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either a slice or a channel with len == 0. if a.NotEmptyf(o
assert/assertion_forward.go:1184
MethodNotEmptyf
NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either a slice or a channel with len == 0. if a.NotEmptyf(o
require/require_forward.go:1185
MethodNotEqualValues
NotEqualValues asserts that two objects are not equal even when converted to the same type a.NotEqualValues(obj1, obj2)
require/require_forward.go:1208
MethodNotEqualValuesf
NotEqualValuesf asserts that two objects are not equal even when converted to the same type a.NotEqualValuesf(obj1, obj2, "error message %s", "forma
assert/assertion_forward.go:1217
MethodNotEqualValuesf
NotEqualValuesf asserts that two objects are not equal even when converted to the same type a.NotEqualValuesf(obj1, obj2, "error message %s", "forma
require/require_forward.go:1218
MethodNotEqualf
NotEqualf asserts that the specified values are NOT equal. a.NotEqualf(obj1, obj2, "error message %s", "formatted") Pointer variable equality is de
assert/assertion_forward.go:1230
MethodNotEqualf
NotEqualf asserts that the specified values are NOT equal. a.NotEqualf(obj1, obj2, "error message %s", "formatted") Pointer variable equality is de
require/require_forward.go:1231
MethodNotErrorAs
NotErrorAs asserts that none of the errors in err's chain matches target, but if so, sets target to that error value.
assert/assertion_forward.go:1239
MethodNotErrorAs
NotErrorAs asserts that none of the errors in err's chain matches target, but if so, sets target to that error value.
require/require_forward.go:1240
MethodNotErrorAsf
NotErrorAsf asserts that none of the errors in err's chain matches target, but if so, sets target to that error value.
assert/assertion_forward.go:1248
MethodNotErrorAsf
NotErrorAsf asserts that none of the errors in err's chain matches target, but if so, sets target to that error value.
require/require_forward.go:1249
MethodNotErrorIs
NotErrorIs asserts that none of the errors in err's chain matches target. This is a wrapper for errors.Is.
assert/assertion_forward.go:1257
MethodNotErrorIs
NotErrorIs asserts that none of the errors in err's chain matches target. This is a wrapper for errors.Is.
require/require_forward.go:1258
MethodNotErrorIsf
NotErrorIsf asserts that none of the errors in err's chain matches target. This is a wrapper for errors.Is.
assert/assertion_forward.go:1266
MethodNotErrorIsf
NotErrorIsf asserts that none of the errors in err's chain matches target. This is a wrapper for errors.Is.
require/require_forward.go:1267
MethodNotImplements
NotImplements asserts that an object does not implement the specified interface. a.NotImplements((*MyInterface)(nil), new(MyObject))
assert/assertion_forward.go:1276
MethodNotImplements
NotImplements asserts that an object does not implement the specified interface. a.NotImplements((*MyInterface)(nil), new(MyObject))
require/require_forward.go:1277
MethodNotImplementsf
NotImplementsf asserts that an object does not implement the specified interface. a.NotImplementsf((*MyInterface)(nil), new(MyObject), "error messag
assert/assertion_forward.go:1286
MethodNotImplementsf
NotImplementsf asserts that an object does not implement the specified interface. a.NotImplementsf((*MyInterface)(nil), new(MyObject), "error messag
require/require_forward.go:1287
MethodNotNilf
NotNilf asserts that the specified object is not nil. a.NotNilf(err, "error message %s", "formatted")
assert/assertion_forward.go:1306
MethodNotNilf
NotNilf asserts that the specified object is not nil. a.NotNilf(err, "error message %s", "formatted")
require/require_forward.go:1307
MethodNotPanicsf
NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. a.NotPanicsf(func(){ RemainCalm() }, "error message %s", "format
assert/assertion_forward.go:1326
MethodNotPanicsf
NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. a.NotPanicsf(func(){ RemainCalm() }, "error message %s", "format
require/require_forward.go:1327
MethodNotRegexp
NotRegexp asserts that a specified regexp does not match a string. a.NotRegexp(regexp.MustCompile("starts"), "it's starting") a.NotRegexp("^start",
require/require_forward.go:1338
MethodNotRegexpf
NotRegexpf asserts that a specified regexp does not match a string. a.NotRegexpf(regexp.MustCompile("starts"), "it's starting", "error message %s",
assert/assertion_forward.go:1348
MethodNotRegexpf
NotRegexpf asserts that a specified regexp does not match a string. a.NotRegexpf(regexp.MustCompile("starts"), "it's starting", "error message %s",
require/require_forward.go:1349
MethodNotSame
NotSame asserts that two pointers do not reference the same object. a.NotSame(ptr1, ptr2) Both arguments must be pointer variables. Pointer variabl
assert/assertion_forward.go:1361
MethodNotSame
NotSame asserts that two pointers do not reference the same object. a.NotSame(ptr1, ptr2) Both arguments must be pointer variables. Pointer variabl
require/require_forward.go:1362
MethodNotSamef
NotSamef asserts that two pointers do not reference the same object. a.NotSamef(ptr1, ptr2, "error message %s", "formatted") Both arguments must be
assert/assertion_forward.go:1374
MethodNotSamef
NotSamef asserts that two pointers do not reference the same object. a.NotSamef(ptr1, ptr2, "error message %s", "formatted") Both arguments must be
require/require_forward.go:1375
MethodNotSubset
NotSubset asserts that the specified list(array, slice...) or map does NOT contain all elements given in the specified subset list(array, slice...) or
assert/assertion_forward.go:1387
MethodNotSubset
NotSubset asserts that the specified list(array, slice...) or map does NOT contain all elements given in the specified subset list(array, slice...) or
require/require_forward.go:1388
MethodNotSubsetf
NotSubsetf asserts that the specified list(array, slice...) or map does NOT contain all elements given in the specified subset list(array, slice...) o
assert/assertion_forward.go:1400
MethodNotSubsetf
NotSubsetf asserts that the specified list(array, slice...) or map does NOT contain all elements given in the specified subset list(array, slice...) o
require/require_forward.go:1401
MethodNotZerof
NotZerof asserts that i is not the zero value for its type.
assert/assertion_forward.go:1416
MethodNotZerof
NotZerof asserts that i is not the zero value for its type.
require/require_forward.go:1417
MethodPanicsWithError
PanicsWithError asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value is an error that satisfies the Equ
assert/assertion_forward.go:1438
MethodPanicsWithError
PanicsWithError asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value is an error that satisfies the Equ
require/require_forward.go:1439
MethodPanicsWithErrorf
PanicsWithErrorf asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value is an error that satisfies the Eq
assert/assertion_forward.go:1450
MethodPanicsWithErrorf
PanicsWithErrorf asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value is an error that satisfies the Eq
require/require_forward.go:1451
MethodPanicsWithValue
PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value equals the expected panic value.
assert/assertion_forward.go:1461
MethodPanicsWithValue
PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value equals the expected panic value.
require/require_forward.go:1462
MethodPanicsWithValuef
PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value equals the expected panic value.
assert/assertion_forward.go:1472
← previousnext →701–800 of 1,305, ranked by callers