testingx

package
v0.0.0-...-9026fe8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsAssertErrorAssertionFunc

func AsAssertErrorAssertionFunc(ea ErrorAssertion) assert.ErrorAssertionFunc

func AsRequireErrorAssertionFunc

func AsRequireErrorAssertionFunc(ea ErrorAssertion) require.ErrorAssertionFunc

func ReadAndClose

func ReadAndClose(t *testing.T, body io.ReadCloser) []byte

Types

type ErrorAssertion

type ErrorAssertion func(TestingT, error) bool

func ErrorIs

func ErrorIs(allExpectedErrors ...error) ErrorAssertion

func ErrorOfType

func ErrorOfType[T error](assertsOfType ...func(T) bool) ErrorAssertion

func ErrorStringContains

func ErrorStringContains(s string) ErrorAssertion

func ExpectedErrorChecks

func ExpectedErrorChecks(expected ...ErrorAssertion) ErrorAssertion

func (ErrorAssertion) Assert

func (e ErrorAssertion) Assert(t TestingT, err error) bool

type TestingT

type TestingT interface {
	Errorf(format string, args ...interface{})
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL