Documentation
¶
Index ¶
- type ErrorAssertionFunc
- func All(expected ...ErrorAssertionFunc) ErrorAssertionFunc
- func Error() ErrorAssertionFunc
- func ErrorIs(allExpectedErrors ...error) ErrorAssertionFunc
- func ErrorOfType[T error](typedAsserts ...func(TestingT, T)) ErrorAssertionFunc
- func ErrorStringContains(s string) ErrorAssertionFunc
- func NoError() ErrorAssertionFunc
- type TestingT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorAssertionFunc ¶
func All ¶
func All(expected ...ErrorAssertionFunc) ErrorAssertionFunc
func Error ¶
func Error() ErrorAssertionFunc
func ErrorIs ¶
func ErrorIs(allExpectedErrors ...error) ErrorAssertionFunc
ErrorIs returns an ErrorAssertionFunc that checks if the given error matches any of the expected errors using errors.Is. If no expected errors are provided, it simply checks that an error is present (similar to Error()). Returns false if the error is nil or doesn't match any expected errors.
func ErrorOfType ¶
func ErrorOfType[T error](typedAsserts ...func(TestingT, T)) ErrorAssertionFunc
func ErrorStringContains ¶
func ErrorStringContains(s string) ErrorAssertionFunc
func NoError ¶
func NoError() ErrorAssertionFunc
func (ErrorAssertionFunc) AsAssert ¶
func (e ErrorAssertionFunc) AsAssert() assert.ErrorAssertionFunc
func (ErrorAssertionFunc) AsRequire ¶
func (e ErrorAssertionFunc) AsRequire() require.ErrorAssertionFunc
Click to show internal directories.
Click to hide internal directories.