Documentation
¶
Index ¶
- func BoolIs(t testing.TB, got, want bool)
- func Chan2NotWritten[T any, U any](t testing.TB, c chan T, d chan U, timeout time.Duration)
- func ChanNotWritten[T any](t testing.TB, c chan T, timeout time.Duration)
- func ChanWritten[T any](t testing.TB, c chan T) T
- func ChanWrittenWithVal[T any](t testing.TB, c chan T, want T) T
- func ChanWrittenWithValTimeout[T any](t testing.TB, c chan T, want T, timeout time.Duration) T
- func Contains[S ~[]E, E comparable](t testing.TB, s S, e E)
- func ContextDone(t testing.TB, ctx context.Context)
- func DeepEqual[T any](t testing.TB, got, want T)
- func DoesNotBlock(t testing.TB, f func())
- func EqualFiles(t testing.TB, path1, path2 string)
- func ErrorIs(t testing.TB, got, want error)
- func NilErr(t testing.TB, err error)
- func NilErrFromChan(t testing.TB, errChan chan error)
- func NoChansWritten[T any](t testing.TB, chans []chan T, timeout time.Duration)
- func NonNilErr(t testing.TB, err error)
- func WriteChan[T any](t testing.TB, c chan T, v T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chan2NotWritten ¶
Chan2NotWritten asserts that the chans are not written at least until the passed timeout value.
func ChanNotWritten ¶
ChanNotWritten asserts that the chan is not written at least until the passed timeout value.
func ChanWritten ¶
ChanWritten returns the value written to chan c or times out.
func ChanWrittenWithVal ¶ added in v0.1.4
ChanWrittenWithVal asserts the chan c was written with a value that DeepEquals v.
func ChanWrittenWithValTimeout ¶ added in v0.2.0
ChanWrittenWithValTimeout asserts the chan c was written with a value that DeepEquals v before the timeout expires.
func Contains ¶ added in v0.2.0
func Contains[S ~[]E, E comparable](t testing.TB, s S, e E)
Contains asserts that s contains e.
func ContextDone ¶
ContextDone asserts the passed context is done.
func DoesNotBlock ¶
DoesNotBlock asserts that calling f() does not block for an inordinate amount of time.
func EqualFiles ¶ added in v0.2.2
EqualFiles asserts that the files in path1 and path2 have the same content.
func NilErrFromChan ¶
NilErrFromChan fails the test if a non-nil error is received in the chan or if the channel fails to be written to in 30 seconds.
func NoChansWritten ¶ added in v0.2.2
NoChansWritten asserts that none of the chans in the slice are written to at least until the passed timeout value.
Types ¶
This section is empty.