Documentation
¶
Index ¶
- func Expect(t TestingT, failMessage string, got, want any, options ...cmp.Option)
- func ExpectContains[T any](t TestingT, failMessage string, slice []T, want T, options ...cmp.Option)
- func ExpectLocation(t TestingT, loc location.Location, fileSuffix string)
- func ExpectPanic(t TestingT, want string, fn func())
- func ExpectPanicMatching[T any](t TestingT, fn func(), match func(T))
- func ExpectSet[T any](t TestingT, failMessage string, got, want []T, less func(T, T) bool, ...)
- type TestingT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpectContains ¶
func ExpectContains[T any]( t TestingT, failMessage string, slice []T, want T, options ...cmp.Option, )
ExpectContains asserts that slice contains an element equal to want.
func ExpectLocation ¶ added in v0.22.0
ExpectLocation asserts that loc has a non-empty Func, a non-zero Line, and that its File ends with the given suffix.
func ExpectPanic ¶
ExpectPanic asserts that a function panics with a specific value.
func ExpectPanicMatching ¶ added in v0.22.0
ExpectPanicMatching asserts that fn panics with a value of type T, then calls match to make further assertions about the panic value.
Types ¶
Click to show internal directories.
Click to hide internal directories.